function dffer_day(n, t) {
    var i = n.substring(5, n.lastIndexOf("-")), r = n.substring(n.length, n.lastIndexOf("-") + 1), u = n.substring(0, n.indexOf("-")), f = t.substring(5, t.lastIndexOf("-")), e = t.substring(t.length, t.lastIndexOf("-") + 1), o = t.substring(0, t.indexOf("-"));
    return (Date.parse(i + "/" + r + "/" + u) - Date.parse(f + "/" + e + "/" + o)) / 864e5
}
function string_to_date(n) {
    var t = Date.parse(n);
    return new Date(t)
}
function getEmailHost(n) {
    var i = n.split("@")[1], t = hash[i];
    return t || (t = "http://mail." + i), t
}
function ShowDialog(n, t, i, r) {
    var f, e, u;
    if (i || (i = 800), r || (r = 600), f = (window.screen.height - r) / 2, e = (window.screen.width - i) / 2, !t && ctx.isIE())
        u = document.getElementById("kefuA"), u.href = n, u.click();
    else
        try {
            window.showModelessDialog(n, window, "dialogHeight: " + r + "px; dialogWidth: " + i + "px;dialogTop: " + f + "; dialogLeft: " + e + "; resizable: yes; status: yes;scroll:no")
        } catch (o) {
            window.open(n, "_blank", "height=" + r + ", width=" + i + ", scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes")
        }
}
function CalcRemainder(n, t) {
    for (var i = 1, r = t; parseInt(r) != r; )
        i *= 10, r = t * i;
    return n * i % r / i
}
//前三|后三 组三、前二、后二
function GetCountDownSum(n) {
    for (var i = 0, t = 1; t <= n; t++)
        i += t;
    return i
}
//前三|后三组六
function GetCountDownSumTwo(n){
	var i = 0;
	(function f(n){
		for (t = 1; t <= n; t++){
			i += t;	
			if(t == n) f(n-1);
		}
	})(n);
	return i;
}
function ComputeCombinationsVariations(n, t) {
    var i = 0, r;
    if (t == 6) {
        if (n < 3)
            return 0;
        for (r = 1; r <= n - 2; r++)
            i += GetCountDownSum(r);
        return i * 6
    }
    return t == 3 ? n < 3 ? 0 : (i = GetCountDownSumTwo(n - 2)) : t == 2 ? n < 2 ? 0 : (i = GetCountDownSum(n - 1), i * 2) : 0
}
function ComputeCombinationsVariationsTwo(n, t) {
    return GetCountDownSum(n - 1);
}
function copy_to_clipboard(n) {
    var i, t, f;
    if (window.clipboardData)
        window.clipboardData.clearData(), window.clipboardData.setData("Text", n);
    else if (navigator.userAgent.indexOf("Opera") != -1)
        window.location = n;
    else if (window.netscape) {
        try {
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
        } catch (o) {
            return alert("被浏览器拒绝！n请在浏览器地址栏输入' '并回车n然后将'signed.applets.codebase_principal_support'设置为'true'"), !1
        }
        if (i = Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard), !i)
            return;
        if (t = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable), !t)
            return;
        t.addDataFlavor("text/unicode");
        var r = {}, e = {}, r = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString), u = n;
        if (r.data = u, t.setTransferData("text/unicode", r, u.length * 2), f = Components.interfaces.nsIClipboard, !i)
            return !1;
        i.setData(t, null, f.kGlobalClipboard)
    } else
        return alert("复制失败，请手动抄写号码。"), !1;
    alert("复制成功!")
}
function GetFormJson(n) {
    var t = {}, i = n.serializeArray();
    return $.each(i, function() {
        t[this.name] !== undefined ? (t[this.name].push || (t[this.name] = [t[this.name]]), t[this.name].push(this.value || "")) : t[this.name] = this.value || ""
    }), t
}
function EmailCheck(n) {
    if (n = n.trim(), n.length > 128 || n.length < 6)
        return alert("邮箱地址{0}不正确".replaceFormat([n])), !1;
    var t = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    return (flag = t.test(n), !flag) ? (alert("邮箱地址{0}不正确".replaceFormat([n])), !1) : !0
}
function GetInfoFromTimeStamp(n, t) {
    var e = "", f = Math.floor(n / 864e5), o, u, s, i, h, r;
    return f = f < 10 ? "0" + f : f, o = n % 864e5, u = Math.floor(o / 36e5), u = u < 10 ? "0" + u : u, s = o % 36e5, i = Math.floor(s / 6e4), i = i < 10 ? "0" + i : i, h = s % 6e4, r = Math.round(h / 1e3), r = r < 10 ? "0" + r : r, e = f == "00" ? u == "00" ? t ? i + " : " + r : i + "分" + r + "秒" : t ? u + " : " + i + " : " + r : u + "时" + i + "分" + r + "秒" : t ? f + "天" + u + " : " + i + " : " + r : f + "天" + u + "时" + i + "分" + r + "秒"
}
function FormatNumber(n, r) {
    var f, u, e;
    for (n = n * 1, f = n >= 0 ? "" : "-", n = Math.abs(n), r = r >= 0 && r <= 20 ? r : 2, n = parseFloat((n + "").replace(/[^\d\.-]/g, "")).toFixed(r) + "", u = n.split(".")[0].split("").reverse(), e = n.split(".")[1], t = "", i = 0; i < u.length; i++)
        t += u[i] + ((i + 1) % 3 == 0 && i + 1 != u.length ? "," : "");
    return r == 0 ? f + t.split("").reverse().join("") : f + t.split("").reverse().join("") + "." + e
}
function GetReadInfoMinSeconds(n, t) {
    var i = n.length, r;
    return i < 5 ? 1e3 : i < 11 ? 2e3 : i < 18 ? 3e3 : i < 26 ? 4e3 : i < 35 ? 5e3 : (r = Math.ceil(i / 8) * 1e3, t && r > t) ? t : r
}
function NetToJsDateTime(str, format) {
    var dt = eval("new " + eval(str).source);
    return format ? dt.Format(format) : dt.Format("yyyy-MM-dd HH:mm:ss")
}
function TowLenNum(n) {
    return n < 10 ? "0" + n : "" + n
}
function ComStopBubble() {
    $.browser.msie ? window.event.cancelBubble = !0 : $.browser.mozilla ? arguments.callee.caller.arguments[0].stopPropagation() : event.stopPropagation()
}
function isNumber(n) {
    return typeof n == "number" && isFinite(n)
}
function isInt(n) {
    var t = /^[-\+]?\d+$/;
    return t.test(n)
}
function isNumber(n) {
    if (isInt(n))
        return !0;
    var t = /^[-\+]?\d+\.\d+$/;
    return t.test(n)
}
function GetIntRandomNum(n, t, i) {
    var e, r, u, f, o, s;
    for (i || (i = []), e = [], r = n; r <= t; r++)
        e.push(r);
    return (u = e.dive(i), f = u.length - 1, f < 0) ? n - 1 : f == 0 ? u[0] : (o = Math.random(), s = Math.round(Math.round(o * f)), u[s])
}
function deep_clone_obj(n) {
    var t, i;
    if (typeof n != "object" || n == null)
        return n;
    t = {};
    for (i in n)
        t[i] = clone_obj(n[i]);
    return t
}
function bind_select_control_value(n, t) {
    if (t !== "" && n)
        for (var i = 0; i < n.options.length; i++)
            if (n.options[i].value == t) {
                $(n.options[i]).attr("selected", !0);
                break
            }
}
function obj2jsonString(n) {
    var t = [], i;
    if (typeof n == "string")
        return '"' + n.replace(/([\'\"\\])/g, "\\$1").replace(/(\n)/g, "\\n").replace(/(\r)/g, "\\r").replace(/(\t)/g, "\\t") + '"';
    if (typeof n == "undefined")
        return "";
    if (typeof n == "object") {
        if (n === null)
            return "null";
        if (n.sort) {
            for (i = 0; i < n.length; i++)
                t.push(obj2jsonString(n[i]));
            t = "[" + t.join() + "]"
        } else {
            for (i in n)
                t.push('"' + i + '":' + obj2jsonString(n[i]));
            t = "{" + t.join() + "}"
        }
        return t
    }
    return n.toString()
}
function show_by_screen_height_center(n, t) {
    var u = $(window).scrollTop();
    if (u != 0 || !t) {
        var r = $(window).height(), f = n.height(), i = 0;
        r >= f && (i = parseInt((r - f) / 2)), i > r / 5 && (i = parseInt(r / 5)), i += u, n.css({top: i}), n.show()
    }
}
function substr_en_chi(n, t, i) {
    var u = /[^\x00-\xff]/g, f, r;
    if (n.replace(u, "mm").length > t)
        for (f = Math.floor(t / 2), r = f; r < n.length; r++)
            if (n.substr(0, r).replace(u, "mm").length >= t)
                return i ? n.substr(0, r) : n.substr(0, r) + "...";
    return n
}
function arg2arr(n, t) {
    return Array.prototype.slice.call(n, t || 0)
}
function htmlEncode(n) {
    return String(n).replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
}
function htmlUnEncode(n) {
    return String(n).replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">")
}
function getIsDebug() {
    try {
        return _isDebug
    } catch (n) {
        return !1
    }
}
function DivDrop() {
    $(".sign_up").mousedown(function(n) {
        $(this).css("cursor", "move");
        var t = $(this).offset(), i = n.pageX - t.left, r = n.pageY - t.top;
        $(document).bind("mousemove", function(n) {
            $(".sign_up").stop();
            var t = n.pageX - i, u = n.pageY - r;
            $(".sign_up").animate({left: t + "px",top: u + "px"}, 10)
        })
    }), $(document).mouseup(function() {
        $(".sign_up").css("cursor", "default"), $(this).unbind("mousemove")
    })
}
function unloadEveryTimeObjs() {
    jQuery.each(jQuery.timer.global, function(n, t) {
        jQuery.timer.remove(t)
    })
}
function home_hash_changed(n) {
    n || (n = "LotteryHall");
    switch (n.toLowerCase()) {
        case "gamerecord":
            $("#side_tag>ul>li.current").removeClass("current"), $(".nav>ul>li").removeClass("current"), $(".nav>ul>li#GameRecord_option").addClass("current");
            break;
        case "userprofitloss":
            $("#side_tag>ul>li.current").removeClass("current"), $(".nav>ul>li").removeClass("current"), $(".nav>ul>li#UserProfitLoss_option").addClass("current");
            break;
        case "membermanage":
            $("#side_tag>ul>li.current").removeClass("current"), $(".nav>ul>li").removeClass("current"), $(".nav>ul>li#MemberManage_option").addClass("current");
            break;
        case "lotteryhall":
            $(".nav>ul>li").removeClass("current")
    }
    var t = {partial: 1};
    $.ajax({type: "GET",url: "index.php?ac=" + n,async: !1,data: t,beforeSend: function() {
            $("body").attr("title", "系统正为你奋力加载中...你能看完这些字，说明你网速严重不给力呀"), $("#side_tag>ul>li>a").css("cursor", "wait")
        },complete: function() {
            $("body").css("cursor", "default"), $("body").attr("title", ""), $("#side_tag>ul>li>a").css("cursor", "pointer")
        },success: function(n) {	
            n == "ToHall" ? location.href = "/Home#LotteryHall" : (unloadEveryTimeObjs(), $(".content_body").html(n))
        },error: function(n) {
            n.status == 500 || n.status == 403, $(".content_body").html(n.responseText)
        }})
}
function GetPageData(n, t, i) {
    var r = $(".content_body");
    i && (r = i), $.ajax({type: "GET",url: n,data: t,beforeSend: function() {
        },complete: function() {
        },success: function(n) {
            r.html(n)
        },error: function(n) {
            n.status == 500 || n.status == 403, r.html(n.responseText)
        }})
}
function refreshGamePoin() {
    ctx.postToken("index.php?ac=RefreshGamePointData", {}, function(n) {
        n && ($("#GamePoint_id").html(FormatNumber(n.GamePoint,2)), $("#AvailablePoint_id").html(n.AvailablePoint), $("#FreezePoint_id").html(n.FreezePoint))
    })
}
function GetNoticeList(n) {
    n.length > 0 && ($("#notice_list ul").html(), $.each(n, function(n, t) {
        $("#notice_list ul").append("<li><a  href='#' data-id='" + t.Id + "'>" + t.Title + "</a></li>"), $("#notice_list ul li:last-child a").data("news", t);
        var i = "";
        i += '<div class="nb-item" id="nbi-' + t.Id + '">', i += '<div class="nbi-header">', i += "<h4>" + t.Title + '</h4><button>展开</button></div><div class="nbi-content">', i += '<p style="text-indent:8mm;">' + t.Content + "</p>", i += '<p style="text-indent:8mm;align=left">' + t.DateInserted + "</p></div></div>", $("#notice-base").append(i)
    }), $.noticeBase())
}
function msgTip(n, t, i, r, u, f) {
    var e = 170, o = 170;
    r && (e = r), u && (o = u), f || (f = 2e3), n.append('<div class="changed_tips" onclick="$(\'.changed_tips\').remove();" style="left: ' + e + "px;top: " + o + 'px"><span class="' + i + '">' + t + "</span></div>"), setTimeout(function() {
        $(".changed_tips").fadeOut(function() {
            $(".changed_tips").remove()
        })
    }, f)
}
function updateUserLeftSideSetting() {
    var n = "";
    $("#side_tag>ul>li.formalPlay").each(function() {
        n += ";" + $(this).find("a").attr("href") + "," + $(this).find("a>.st_award_name").text().trim() + "," + $(this).find("a>.st_award_model").text().trim()
    }), ctx.postToken("/Home/SetUserLeftSideSetting", {setting: n.substr(1)}, function(n) {
        n != "OK" && alert("拖动设置更新失败，原因：" + n)
    })
}
function LoadNewMessage() {
    var t = $("#UserId").val(), n = $.localStorage.getItem("sysMsgKeyIndex" + $("#UserId").val()), i = $.cookie("msg_statc");
    n !== null && n !== "" && ($.systemMessageFunc.loadMessage(i), n = n.split(","), $("#sm_read").unbind(), $("#sm_read").bind({click: function() {
            var i = 0, u = $("#system_msg .sm_statc:first span:first").text(), r = parseInt(u) - 1, f = "sysMsg_" + t + "_" + n[r];
            $("#system_msg .sm_title:first ul li").eq(r).remove(), $("#system_msg .sm_body:first .sm_item").eq(r).remove(), $.localStorage.deleteItem(f), n.splice(r, 1), $.localStorage.setItem("sysMsgKeyIndex" + $("#UserId").val(), n), i = n.length, $("#system_msg_locker em:first").text(i), $("#system_msg .sm_statc:first span:last").text(i), $.systemMessageFunc.flipMessage(i), $.systemMessageFunc.scanMessage(), n.length <= 0 && ($.localStorage.deleteItem("sysMsgKeyIndex" + $("#UserId").val()), $.systemMessageFunc.removeMessage())
        }}))
}
function sysMsgSet() {
    var u = $("#UserId").val(), n = $.localStorage.getItem("sysMsgKeyIndex" + u), t, r, i;
    if (n)
        n = n.split(",");
    else
        return;
    for (t = n.length, $("#system_msg_locker em:first").text(t), $("#system_msg .sm_statc:first span:last").text(t), r = 0; r < t; r++)
        i = $.localStorage.getItem("sysMsg_" + u + "_" + n[r]), i = JSON.parse(i), $("#system_msg .sm_title:first ul").append($("<li>" + $.strCode.unEsCape(i.title) + "</li>")), $("#system_msg .sm_body:first").append($('<div class="sm_item">' + $.strCode.unEsCape(i.content) + "</div>"));
    $.systemMessageFunc.flipMessage(t)
}
function sysMsgUpdate(n, t, i) {
    var r = $.localStorage.getItem("sysMsgKeyIndex" + $("#UserId").val());
    r = r ? r + "," + n : n, $.localStorage.setItem("sysMsgKeyIndex" + $("#UserId").val(), r), $.localStorage.setItem(t, i)
}
function InitUnReadNews(n) {
    var e = $("#UserId").val(), t;
    if ($.systemMessageFunc.messageSet(), n.length > 0) {
        var i = "", r = "", u = "", f = "";
        for (t = 0; t < n.length; t++)
            i = "sysMsg_" + e + "_" + n[t].ID, r = $.strCode.toEsCape(n[t].Title), u = $.strCode.toEsCape(n[t].Content), f = JSON.stringify({mid: n[t].ID,title: r,content: u}), $.localStorage.getItem(i) == null && sysMsgUpdate(n[t].ID, i, f)
    }
    sysMsgSet()
}
function getRecentDataToArray(n) {
	//console.log(66);
    for (var f = [], e, o, r = 0; r < n.rows.length; r++) {
        var t = n.rows[r], i = "", u = 0;
        t.OrderStatus == "10" ? i = "已撤单" : t.hasRunLottery == "否" ? i = "未开奖" : (u = parseFloat(t.profit), i = u == 0 ? "平" : u > 0 ? "赢" : t.BonusTotalNumber > 0 ? "输(中奖)" : "输(未中奖)"), e = t.Description.startWith("自动追号"), o = [t.BetContent, t.EncodeId, t.UserName, FormatNumber(t.BetUnitPrice), t.LotteryName, t.IssueNumber, t.RuleName, t.BonusNumber, t.TotalBet, FormatNumber(t.TotalBet * t.BetUnitPrice, 2), t.BonusTotalNumber == null ? 0 : t.BonusTotalNumber, FormatNumber(t.BonusMoney), FormatNumber(t.UnitPaymentPrice, 2), FormatNumber(t.ReturnPoint * 100, 2) + "% " + FormatNumber(t.ReturnPoint * t.TotalBet * t.BetUnitPrice), t.InsertDate, i, FormatNumber(u, 2), t.Id, t.LotteryId, t.OrderStatus,t.Uid, t.MemberId, e], f.push(o)
    }
    return f
}
function init_home_index() {
    function c() {
        function a() {
            if (r != "stop") {
                var n = Math.abs(+new Date - s);
                n - e > 2e3 && ($.iMobile.isIPhone5() ? setTimeout(function() {
                    $(window).trigger("hashchange")
                }, 1e3) : c())
            }
        }
        function c() {
            i = $(".aw_item.current"), f = i.find(".aw_title>h2"), u = i.find(".aw_cutdown");
            var c = i.attr("data-url");
            c && ctx.postTokenEx({url: c + "?r=" + Math.random(),beforeSend: function() {
                    r = undefined, t = undefined, n = undefined, l(0)
                },success: function(v) {
                    o = 0;
                    var y;
                    v.stop_schedule == 1 ? i ? (f.html("暂停销售"), u.html("<h5>...</h5><h6>暂停销售</h6>"), i.find(".aw_betting_button").hide(), i.find(".aw_title").hide(), r = "stop") : window.location.href = "/Home" : (i.find(".aw_betting_button").show(), i.find(".aw_title").show(), r = v.issue_number, t = v.differ * 1e3, n = v.advance * 1e3, s = +new Date, e = 0, t < 0 && (n = t + n, n < 0 && (n = c.getLastString(1) == "3" ? 9e4 : 6e4)), l(0), h || (h = $("body").everyTime(1e3, "BettingShowRemainTime", function() {
                        e += 1e3, a(), l(1e3)
                    })))
                }})
        }
        function l(i) {
            if (r == "stop") {
                o++, o == 60 && c();
                return
            }
            if (r == undefined) {
                f.html("正在获取奖期..."), u.html("<h5>...</h5><h6>获取时间中...</h6>");
                return
            }
            var e = "第 <span>" + r + "</span> 期";
            f.html() != e && f.html(e), t == undefined ? u.html("<h5>...</h5><h6>获取时间中...</h6>") : (t = t - i, t < 0 ? t = undefined : t < 1e4 ? u.html('<h5>剩余投注时间</h5><h6><label style="color:red">' + GetInfoFromTimeStamp(t) + "</label></h6>") : u.html("<h5>剩余投注时间</h5><h6>" + GetInfoFromTimeStamp(t) + "</h6>")), t == undefined && n != undefined && (n = n - i, n < 0 ? (n = undefined, c()) : u.html("<h5>距开奖时间</h5><h6>" + GetInfoFromTimeStamp(n) + "</h6>"))
        }
        c()
    }
    var s, e, h, n, r, t, o = 0, f, u, i;
    $(document).ready(function() {
        var t = [$(".content_body:first").outerWidth() - 20, $(".content_body:first").outerHeight() - 80], n;
        $("#home_slide").css({width: t[0] + "px",height: t[1] + "px"}), $(".hs_fliplock span").css({top: t[1] / 2 - 70 + "px"}), $(window).resize(function() {
            t = [$(".content_body:first").outerWidth() - 20, $(".content_body:first").outerHeight() - 80], $("#home_slide").css({width: t[0] + "px",height: t[1] + "px"}), $(".hs_fliplock span").css({top: t[1] / 2 - 70 + "px"})
        }), n = [600, 40, 220, 290], $("#home_slide").roundFlip({flipItem: ".aw_item",itemWidth: 200,itemHeight: 200,marginInt: 70,topMarginInt: 50,speed: 600,prevBtn: "#prev",nextBtn: "#next",beforeFunc: function() {
                $(".aw_item .aw_title").css({top: "-" + n[0] + "px"}), $(".aw_item .aw_cutdown").css({top: n[0] + "px"}), $(".aw_item .aw_betting_button").css({top: n[0] + "px"})
            },afterFunc: function(t) {
                $(".aw_item").eq(t).find(".aw_title:first").stop(!0, !0).animate({top: "-" + n[1] + "px"}, 400), $(".aw_item").eq(t).find(".aw_cutdown:first").stop(!0, !0).animate({top: n[2] + "px"}, 300), $(".aw_item").eq(t).find(".aw_betting_button:first").stop(!0, !0).animate({top: n[3] + "px"}, 600)
            },afterSlipEx: function() {
                $(".aw_item>.aw_title").hide(), $(".aw_item.current>.aw_title").show(), $(".aw_item>.aw_cutdown").hide(), $(".aw_item.current>.aw_cutdown").show(), $(".aw_item>.aw_betting_button").hide(), $(".aw_item.current>.aw_betting_button").show(), c()
            }}), $(".aw_item").bind({click: function() {
                if (r == "stop")
                    return alert("此彩种当前处于暂停销售状态"), !1;
                var t = $(this);
                $(this).find(".aw_title:first").stop(!0, !0).animate({top: "-" + n[0] + "px"}, 400), $(this).find(".aw_cutdown:first").stop(!0, !0).animate({top: n[0] + "px"}, 300), $(this).find(".aw_betting_button:first").stop(!0, !0).animate({top: n[0] + "px"}, 600, function() {
                    $("#side_tag>ul>li").removeClass("current"), window.location.href = "#Betting" //+ t.attr("data-url").getLastString(1)
                })
            }}), $("#page_ad .cad_list ul:first li").each(function() {
            $(this).bind({click: function() {
                    $("#cad_body_wrap").show(), $("#cad_body_wrap .cad_body:first").stop(!0, !1).animate({top: "10px"})
                }})
        }), $("#cad_body_wrap .close:first").bind({click: function() {
                $("#cad_body_wrap .cad_body:first").stop(!0, !1).animate({top: "410px"}, function() {
                    $("#cad_body_wrap").hide()
                })
            }})
    })
}
function GetAllNumsItemValue(n, t) {
    var i = [];
    return n.find("em").each(function() {
        var n = $(this).text();
        t && i.push(t), i.push(n)
    }), t && i.length > 0 && (i = i.skip(1)), i
}
function ComputeBetTotalNumber(n, t) {
    var r = GetAllNumsItemValue(n), i = 0, u, f;
    switch (t) {
        case "allSelect":
		case "allSelectDs":
            for (i = r[0].length?r[0].length:1, u = 1; u < r.length; u++){
				if(!r[u].length) i = i * 1;
				else i = i * r[u].length;
			}
            break;
        case "sccInput": 
		case "scczxInput":
		case "sccWeiInput":
            i = 1;
            break;
        case "combineBdw":
			i = r[0].length;
			break;
        case "allSelectDw":
            for (u = 0; u < r.length; u++){
				if(r[u] != '-') i += r[u].length;
			}    
            break;
        case "combine":
			m = $(".bm_model .current").attr("num");
            i = ComputeCombinationsVariations(r[0].length, m);
            break;
		case "combineTwo":
			m = $(".bm_model .current").attr("num");
            i = ComputeCombinationsVariationsTwo(r[0].length, m);
            break;
        case "混合":
            f = r[0].toArray().distinct().length, r[0].length == 3 ? f == 3 ? i = 6 : f == 2 ? i = 3 : f == 1 && (i = 1) : r[0].length == 2 && (f == 2 ? i = 2 : f == 1 && (i = 1))
    }
    return i
}
function init_betting() {
    function at(n, t) {
        var i = t.split("|"), r, o, s, h, f;
        if (i.length >= 4 && (r = i[1], o = location.href.split("?")[0].toLowerCase(), (o.endWith("betting/" + r) || o.endWith("betting/" + r + "/")) && (s = r == 1 || r == 3 ? i[2].substr(2, 6) + i[2].substr(9) : i[2], h = $("#top5Container .5_issueNumber").text(), h.indexOf(s) < 0))) {
            y(i[3]), $("#pre_award_period").text(i[2]);
            var e = i[3].split(","), c = parseInt(e[e.length - 1]), l = c > 4 ? "大" : "小", a = c % 2 == 0 ? "双" : "单", u = $("#top5Container>tr:last");
            for (u.find(".5_issueNumber").text(s), u.find(".5_bigStatus").text(l), u.find(".5_singleStatus").text(a), f = 0; f < e.length; f++)
                u.find(".5_num>li>span").eq(f).text(e[f]);
            u.insertBefore($("#top5Container>tr:first"))
        }
    }
    function ct(n, t) {
        var i = t.split("|"), r, u;
        i.length >= 3 && (r = i[1], u = i[2], r == _lotteryId && u == $("#pre_award_period").text() && p(0))
    }
    function e() {
        a = !0, $(".traceCheckBox.checked").trigger("click"), a = !1, s()
    }
    function s() {
        var n = 0, t = $("#singleTotalMoney").text() * 1;
        return $(".traceCheckBox.checked").each(function() {
            var i = $(this).closest("tr"), r = i.find(".traceUnitPrice");
            r.text(t * i.find(".traceTimes").val()), n += r.text() * 1
        }), f ? $("#traceProfitMoney").text(n.toFixed(2)) : $("#traceTimesMoney").text(n.toFixed(2)), n
    }
    function h(n) {
        var r = $(".bm_model>ul").find("li.current").attr("MatchType"), t = 0, i;
        return $(".numb_checked>span").each(function() {
            t += ComputeBetTotalNumber($(this), r)
        }), $("#singleBettingTotal").text(t), i = $("#record_sum_input>input").val().trim() * 1, $("#singleTotalMoney").text((t * i * 2).toFixed(2)), n ? e() : s(), t
    }
    function lt(n) {
        function b() {
            if (u != "stop") {
                var n = Math.abs(+new Date - it);
                n - v > 2e3 && f()
            }
        }
        function f() {
            var n = "index.php?ac=index&op=GetScheduleAndIssueNumber&typeid=" + _lotteryId + "?r=" + Math.random();
            ctx.postTokenEx({url: n,beforeSend: function() {
                    u = undefined, t = undefined, i = undefined, l(0)
                },success: function(n) {
                    var r;
                    n.stop_schedule == 1 ? window.location.href = "index.php?ac=index&op=" : (h = !1, c = 0, u = n.issue_number, t = n.differ * 1e3, i = n.advance * 1e3, rt = t + i, it = +new Date, g = n.preIssueNumber, nt = n.preBonusNumber, w.html(g), y(nt), v = 0, t < 0 ? (i = t + i, i < 0 && (i = _lotteryId == 3 ? 9e4 : 6e4)) : ($("#bt_item_cutdown").find(".bt_item_cutdown_locker").fadeOut(), $("#bt_item_cutdown").find(".bt_item_cutdown_title").show(), $("#bt_item_cutdown").find(".bt_item_cutdown_timer").show(), ctx.userType != 1 && $("#betting_btn>span").removeClass("locked")), l(0), tt || (tt = $("body").everyTime(1e3, "BettingShowRemainTime", function() {
                        v += 1e3, b(), l(1e3)
                    })))
                }})
        }
        function l(l) {
            if (u == "stop") {
                c++, c == 60 && f();
                return
            }
            if (u == undefined) {
                o.html("正在获取奖期..."), a.html("正在获取奖期..."), r.html("正在获取奖期时间..."), s.html("正在获取奖期时间...");
                return
            }
            var v = "第 <span>" + u + "</span> 期";
            o.html() != v && o.html(v), a.html(u), t == undefined ? r.html("正在获取奖期时间...") : (t = t - l, t < 0 ? t = undefined : (p.html("剩余投注时间"), s.html(GetInfoFromTimeStamp(t + i, 1)), t < 1e4 ? r.html('<span><label style="color:red">' + GetInfoFromTimeStamp(t, 1) + "</label></span>") : r.html("<span>" + GetInfoFromTimeStamp(t, 1) + "</span>")), t >= 7e3 && t < 8e3 && typeof n == "function" && n()), t == undefined && i != undefined && (i = i - l, i < 0 ? (i = undefined, f()) : (s.html(GetInfoFromTimeStamp(i, 1)), h || (k(), $("#trace_number_table_id tr[IssueNumber=" + u + "]").remove(), e(), h = !0)))
        }
        var o = $(".bt_item_name"), p = $("#bt_item_cutdown>.bt_item_cutdown_title"), r = $("#bt_item_cutdown>.bt_item_cutdown_timer"), d = $("#bt_item_cutdown>.bt_item_cutdown_locker"), s = $(".award_timer"), a = $("#cur_award_period"), w = $("#pre_award_period"), h = !1;
        f()
    }
    function d() {
        function n(t, i) {
            t.css({top: "0px"}).stop(!0, !1).animate({top: "-400px"}, 1e3 + i * 2, function() {
                n(t, i)
            })
        }
        $(".bt_item_win_numbers:visible").each(function(t) {
            var i = $(this).find("ol:first");
            n(i, t)
        })
    }
    function y(n) {
        if (n) {
            var t = n.split(",");
            $(".bt_item_win_numbers:visible").each(function(n) {
                var i = $(this).find("ol:first");
                i.css({top: "0px"}).stop(!0, !1).animate({top: "-350px"}, 300 * (n + 1), function() {
                    i.css({top: "0px"}).stop(!0, !1).animate({top: "-" + 40 * t[n] + "px"}, 300 * (n + 1))
                })
            })
        } else
            d()
    }
    function k() {
        $("#bt_item_cutdown").find(".bt_item_cutdown_title").fadeOut(), $("#bt_item_cutdown").find(".bt_item_cutdown_timer").fadeOut(), $("#bt_item_cutdown").find(".bt_item_cutdown_locker").show(), $("#betting_btn>span").addClass("locked")
    }
    function ut(n, t) {
		//console.log(99);
        for (var i = 0; i < t.length; i++)
            if (n == t[i][1])
                return t[i];
        return null
    }
    function w(n) {
		//console.log(55);
        o = n.totalPages, l = getRecentDataToArray(n);	
        var t = st({data: l});
        $("#recentContainer").html(t), $("#totalRecords").html("共" + n.totalRecords + "条记录"), $("#totalPages").html("第 {0}/{1} 页".replaceFormat([r, o]))
    }
    function p(n) {
		//console.log(22);
        ctx.postToken("index.php?ac=RefreshHistoryData", {lotteryId: _lotteryId,needRecent: n}, function(t) {
            b = t.top10;
            var i = ot({data: t.top10});
            $(".top10Container").html(i), n == 1 && (r = 1, w(t.recentData))
        })
    }
    var a = !1, f = !1, ht = {"后三直选复式": '从<span class="light_red">后3位</span>各选<span class="light_yellow">1个或多个</span>号码，选号与开奖号后3位按位一致即中奖。',"前三直选复式": '从<span class="light_red">前3位</span>各选<span class="light_yellow">1个或多个</span>号码，选号与开奖号前3位按位一致即中奖。',"3D直选复式": '选择<span class="light_yellow">1个或多个</span>号码，选号与开奖号按位一致即中奖。',"排3直选复式": '选择<span class="light_yellow">1个或多个</span>号码，选号与开奖号按位一致即中奖。',"后三直选单式": '手动在输入框中输入<span class="light_red">一注或多注</span>投注号码，多注投注号码之间以<span class="light_yellow">逗号、分号、空格、回车</span>隔开，号码和位置都对应即中奖，示例<span class="light_red">123,456 789</span>。',"后三组选混合": '手动在输入框中输入<span class="light_red">一组或多组</span>投注号码（每组的形态可以混合包括组三、组六、豹子的形态），多组投注号码之间以<span class="light_yellow">逗号、分号、空格、回车</span>隔开，示例<span class="light_red">123,456 789</span>。',"前三直选单式": '手动在输入框中输入<span class="light_red">一注或多注</span>投注号码，多注投注号码之间以<span class="light_yellow">逗号、分号、空格、回车</span>隔开，号码和位置都对应即中奖，示例<span class="light_red">123,456 789</span>。',"3D直选单式": '手动在输入框中输入<span class="light_red">一注或多注</span>投注号码，多注投注号码之间以<span class="light_yellow">逗号、分号、空格、回车</span>隔开，号码和位置都对应即中奖，示例<span class="light_red">123,456 789</span>。',"排3直选单式": '手动在输入框中输入<span class="light_red">一注或多注</span>投注号码，多注投注号码之间以<span class="light_yellow">逗号、分号、空格、回车</span>隔开，号码和位置都对应即中奖，示例<span class="light_red">123,456 789</span>。',"前三组选混合": '手动在输入框中输入<span class="light_red">一组或多组</span>投注号码（每组的形态可以混合包括组三、组六、豹子的形态），多组投注号码之间以<span class="light_yellow">逗号、分号、空格、回车</span>隔开，示例<span class="light_red">123,456 789</span>。',"3D组选混合": '手动在输入框中输入<span class="light_red">一组或多组</span>投注号码（每组的形态可以混合包括组三、组六、豹子的形态），多组投注号码之间以<span class="light_yellow">逗号、分号、空格、回车</span>隔开，示例<span class="light_red">123,456 789</span>。',"排3组选混合": '手动在输入框中输入<span class="light_red">一组或多组</span>投注号码（每组的形态可以混合包括组三、组六、豹子的形态），多组投注号码之间以<span class="light_yellow">逗号、分号、空格、回车</span>隔开，示例<span class="light_red">123,456 789</span>。',"后三组选组三": '开奖号码<span class="light_red">后3位</span>中有任意两位数字相同，且投注号码与中奖号码的数字相同， 顺序不限，即中奖。',"后三组选组六": '开奖号码<span class="light_red">后3位</span>各不相同，所选号码包含开奖号码后3位（顺序不限），即中奖。',"前三组选组三": '开奖号码<span class="light_red">前3位</span>中有任意两位数字相同，且投注号码与中奖号码的数字相同， 顺序不限，即中奖。',"前三组选组六": '开奖号码<span class="light_red">前3位</span>各不相同，所选号码包含开奖号码前3位（顺序不限），即中奖。',"3D组选组六": '开奖号码<span class="light_red">3位</span>各不相同，所选号码包含开奖号码3位（顺序不限），即中奖。',"3D组选组三": '开奖号码<span class="light_red">3位</span>中有任意两位数字相同，且投注号码与中奖号码的数字相同， 顺序不限，即中奖。',"排3组选组六": '开奖号码<span class="light_red">3位</span>各不相同，所选号码包含开奖号码3位（顺序不限），即中奖。',"排3组选组三": '开奖号码<span class="light_red">3位</span>中有任意两位数字相同，且投注号码与中奖号码的数字相同， 顺序不限，即中奖。',"后二直选复式": '从<span class="light_red">后2位</span>各选<span class="light_yellow">1个或多个</span>号码，选号与开奖号后2位按位一致即中奖。',"前二直选复式": '从<span class="light_red">前2位</span>各选<span class="light_yellow">1个或多个</span>号码，选号与开奖号前2位按位一致即中奖。',"后二直选单式": '手动在输入框中输入<span class="light_red">一注或多注</span>投注号码，多注投注号码之间以<span class="light_yellow">逗号、分号、空格、回车</span>隔开，号码和位置都对应即中奖，示例<span class="light_red">12,45 78</span>。',"后二组选混合": '手动在输入框中输入<span class="light_red">一组或多组</span>投注号码（每组的形态可以混合包括对子、非对子形态），多组投注号码之间以<span class="light_yellow">逗号、分号、空格、回车</span>隔开，示例<span class="light_red">12,45 78</span>。',"前二直选单式": '手动在输入框中输入<span class="light_red">一注或多注</span>投注号码，多注投注号码之间以<span class="light_yellow">逗号、分号、空格、回车</span>隔开，号码和位置都对应即中奖，示例<span class="light_red">12,45 78</span>。',"前二组选混合": '手动在输入框中输入<span class="light_red">一组或多组</span>投注号码（每组的形态可以混合包括对子、非对子形态），多组投注号码之间以<span class="light_yellow">逗号、分号、空格、回车</span>隔开，示例<span class="light_red">12,45 78</span>。',"后二组选组二": '开奖号码<span class="light_red">后2位</span>不为对子且含在选号中，即中奖。',"前二组选组二": '开奖号码<span class="light_red">前2位</span>不为对子且含在选号中，即中奖。',"后一直选复式": '从<span class="light_red">个位</span>选择<span class="light_yellow">1个或多个</span>号码，选号与开奖号个位一致即中奖。',"后三不定位": '选择<span class="light_yellow">1个或多个</span>号码，选号与开奖号任意后三位一致即中奖。',"前三不定位": '选择<span class="light_yellow">1个或多个</span>号码，选号与开奖号任意前三位一致即中奖。',"五星定位胆": '从<span class="light_red">任意位</span>选择<span class="light_yellow">1个或多个</span>号码，选号与开奖号中对应位置的号码一致即中奖一注，可中奖多注。'}, n = {}, it, v, tt, i, u, t, rt, g, nt, c;
	$.bettingSumSlider = {mainSet: function() {
            $("#rebate_option").bind({click: function() {
                    if (n.IsReturnPointLocked == "1"){
						return !1;
					}else{ 
						$.dialogCont({contName: "#rebate"}), n.CurValue = n.SaveReturnPoint;
						var t = (n.Maximum - n.CurValue) / n.SmallChange * $.bettingSumSlider.getSetpValue();
						$.bettingSumSlider.handlePos(t)
					}
                }});
            var t = !1;
            $("#save_bonus_slider").bind({click: function() {
					$("#double_pay").text($("#percentage>span").html()),$.dialogContentSet.hideDialogCont("#rebate"),$.bodyMsg({msg: "保存成功"});
                }}), $("#chanle_bonus_slider").bind({click: function() {
                    $.dialogContentSet.hideDialogCont("#rebate")
                }}), $.bettingSumSlider.slideHandleBind(), $.bettingSumSlider.steppingSetBind()
        },sliderLoad: function() {
            var r = $(".bm_model>ul>li.current").attr("unit-value"), t = r.split("|"), i;
			if(parseFloat(t[0]) == parseFloat(t[4])) $("#pay").show(),$("#pay_edit").hide(),$("#pay>#double_pay").text(parseFloat(t[0])),n.IsReturnPointLocked = t[5]
			else
			$("#pay").hide(),$("#pay_edit").show(),
            n.SaveReturnPoint != undefined && n.IsReturnPointLocked == "0" && (i = n.SaveReturnPoint), n = {}, n.UnitPaymentPrice = parseFloat(t[0]), n.userReturnPoint = parseFloat(t[1]), n.OffsetPaymentPrice = parseFloat(t[3]), n.MinUnitPaymentPrice = parseFloat(t[4]), n.IsReturnPointLocked = t[5], n.SmallChange = 1, n.IsReturnPointLocked == "0" ? (n.Maximum = (n.userReturnPoint + (n.UnitPaymentPrice - n.MinUnitPaymentPrice) * n.SmallChange / n.OffsetPaymentPrice).toFixedNum(4), n.CurValue = (parseFloat(t[0])-parseFloat(t[4]))/n.OffsetPaymentPrice, n.Minmum = CalcRemainder(n.CurValue, n.SmallChange).toFixedNum(4)) : (n.CurUnitPaymentPrice = n.UnitPaymentPrice, n.CurValue = n.userReturnPoint), n.SaveReturnPoint = n.CurValue, $.bettingSumSlider.refreshValueShow(!0)
        },refreshValueShow: function(t) {
            var i = n.CurValue;
            n.CurUnitPaymentPrice = (n.UnitPaymentPrice + (n.userReturnPoint - n.CurValue) / n.SmallChange * n.OffsetPaymentPrice).toFixedNum(4), $("#percentage>span").text(n.CurUnitPaymentPrice.toString()), $("#proportion>span").text(n.UnitPaymentPrice), t && ($("#percent_pay").text(i), $("#single_pay").text(n.UnitPaymentPrice), $("#double_pay").text(n.MinUnitPaymentPrice))
        },handlePos: function(n) {
            n = parseFloat(n).toFixedNum(4);
            var f = $(".slider_bar_line:first"), t = $("#slider_handle"), i = 0 - t.outerWidth() / 2, u = f.outerWidth(), r = n + i;
            r <= i ? t.css({left: i}) : r >= u ? t.css({left: u + i}) : t.css({left: r}), $.bettingSumSlider.refreshValueShow(!1)
        },getSetpValue: function() {
            var t = $(".slider_bar_line:first").outerWidth();
            return (t / (n.Maximum - n.Minmum) * n.SmallChange).toFixedNum(4)
        },steppingSetBind: function() {
            $("#bs_add").click(function() {
                if (n.CurValue = (n.CurValue - n.SmallChange).toFixedNum(4), n.CurValue < n.Minmum)
                    return n.CurValue = (n.CurValue + n.SmallChange).toFixedNum(4), !1;
                var t = $("#slider_handle"), i = t.position().left + t.width() / 2;
                i += $.bettingSumSlider.getSetpValue(), $.bettingSumSlider.handlePos(i)
            }), $("#bs_reduce").click(function() {
                if (n.CurValue = (n.CurValue + n.SmallChange).toFixedNum(4), n.CurValue > n.Maximum)
                    return n.CurValue = (n.CurValue - n.SmallChange).toFixedNum(4), !1;
                var t = $("#slider_handle"), i = t.position().left + t.width() / 2;
                i -= $.bettingSumSlider.getSetpValue(), $.bettingSumSlider.handlePos(i)
            })
        },slideHandleBind: function() {
            function s(n) {
                t = !0, r = $("#slider_handle").position().left, u = n.pageX - r, i = n.pageX, e = $("#slider_handle").width() / 2
            }
            function h(t) {
                f = t.pageX - u;
                var r = $.bettingSumSlider.getSetpValue(), o = i - t.pageX;
                if (o >= r) {
                    if (n.CurValue = (n.CurValue + n.SmallChange).toFixedNum(4), n.CurValue > n.Maximum)
                        return n.CurValue = (n.CurValue - n.SmallChange).toFixedNum(4), !1;
                    i -= r
                } else if (-o >= r) {
                    if (n.CurValue = (n.CurValue - n.SmallChange).toFixedNum(4), n.CurValue < n.Minmum)
                        return n.CurValue = (n.CurValue + n.SmallChange).toFixedNum(4), !1;
                    i += r
                }
                $.bettingSumSlider.handlePos(f + e)
            }
            function o() {
                if (t) {
                    var i = (n.Maximum - n.CurValue) / n.SmallChange * $.bettingSumSlider.getSetpValue();
                    $.bettingSumSlider.handlePos(i)
                }
                t = !1
            }
            var t = !1, r, u, f, i, e, c = $(".slider_bar:first");
            $("#slider_handle").bind({mousedown: function(n) {
                    n.preventDefault && n.preventDefault(), s(n)
                },mouseup: function() {
                    o()
                }}), $(document).bind({mousemove: function(n) {
                    if (t)
                        h(n);
                    else
                        return !1
                },mouseup: function() {
                    o()
                }})
        }}, $.bettingJbb = function() {
        function l(n) {
            $("#record_sum_input").find("span").remove(), $("#record_sum_input").append("<span>" + n + "</span>"), $("#record_sum_input span:first").css({left: (40 - $("#record_sum_input span:first").width()) / 2 + "px"})
        }
        function k() {
            var n = $("#record_sum_input>input").val().trim(), i = /^[0-9]{0,6}\.{0,1}[0-9]{0,1}$/, t;
            return n === "" || !i.exec(n) || parseFloat(n) == 0 ? (t = "单注金额不合法，请修改! 注意:最多一位小数!", $("#record_sum_input>input").focus(), t) : ""
        }
        function d(n) {
            var t, i, u, f;
            for (g.removeClass("current"), n.addClass("current"), t = n.attr("data-model"), t = t.split(","), r.hide(), i = 0; i < t.length; i++)
                o.find("[rule_id=" + t[i] + "]").show();
            u = c.find("li:visible"), f = 0, u.eq(f).trigger("click")
        }
        function p() {
            var n = "";
            return $(".numb_checked>span").each(function() {
                n += "|" + $(this).text()
            }), n.substr(1)
        }
        var n = $("#betting_controll_panle"), v = n.find(".betting_type:first"), g = v.find("ul:first>li"), u = n.find(".numb_check_item"), a = n.find("#betting_btn"), t = n.find(".numb_checked:first"), nt = n.find(".bs_str:first span:first"), y = n.find(".bs_str input:first"), c = n.find(".bm_model:first"), r = c.find("ul:first>li"), o = c.find("ul:first"), w = n.find("#add_betting_number"), b = n.find("#clear_betting_number"), i;		
        y.bind({keyup: function() {
                $("#record_sum_input span").remove()
            },blur: function() {
                var r = $(this).val(), n, t, i;
                if (r == "")
                    return l("请填写单个号码下单分数，如100元。"), $(this).focus(), !1;
                if (n = k(), n != "")
                    return l(n), $(this).focus(), !1;
                t = $("#singleBettingTotal").text(), i = $("#record_sum_input>input").val().trim() * 1, $("#singleTotalMoney").text((t * i * 2).toFixed(2)), s()
            }}), u.each(function() {
            var t = $(this).find(".nci_numbs:first"), n = t.find("ol:first li"), i = $(this).find(".nci_sort:first");
            n.on({click: function() {
                    $(this).hasClass("current") ? $(this).removeClass("current") : $(this).addClass("current")
                }});
            i.find("li").on("click", function() {
                var u = $(this).attr("data-option"), r = $(this).index();
                switch (u) {
                    case "all":
                        n.removeClass("current").addClass("current");
                        break;
                    case "big":
                        n.removeClass("current"), t.find("ol:first li:gt(4)").addClass("current");
                        break;
                    case "small":
                        n.removeClass("current"), t.find("ol:first li:lt(5)").addClass("current");
                        break;
                    case "odd":
                        n.removeClass("current"), t.find("ol:first li:odd").addClass("current");
                        break;
                    case "even":
                        n.removeClass("current"), t.find("ol:first li:even").addClass("current");
                        break;
                    case "clear":
                        n.removeClass("current");
                        break;
                    default:
                        return !1
                }
                r == 5 ? i.find("li").removeClass("current") : i.find("li").removeClass("current").eq(r).addClass("current")
            })
        }), b.bind({click: function() {
                if (t.find("span").length > 0)
                    if (confirm("确定清除当前所选的号码吗？"))
                        t.html(""), h();
                    else
                        return !1;
                else
                    return !1
            }});
        t.find("tr td .del").on({click: function() {
                if (confirm("确定删除该条投注记录吗？"))
                    $(this).parent().parent().remove(), h();
                else
                    return !1
            }});
        $(".numb_checked>span").die("dblclick").live("dblclick", function() {
            $(this).remove(), h()
        }), w.bind("click", function() {
            var $curPlay = o.find("li.current"), typeName = $curPlay.attr("MatchType"), selectedRegex = $curPlay.attr("SelectedRegex"), num = $curPlay.attr("Num"),inputText, strs, html, i, tmp, tmpHtml, j, hasAlert, bettingInner, numbserStr;
            if (typeName == "sccInput" || typeName == "sccWeiInput" || typeName == "scczxInput") {
				var weiShu=[];
                if (inputText = $("#singleNumberInput").val().trim(), inputText.length == 0)
                    return alert("号码输入不为空!"), !1;
				strs = inputText.split(/[\s,;\n]+/),html = "";
				if(typeName == "sccWeiInput"){
					if($("#wei-shu :checked").length != num)
						return alert("请选择"+num+"位数"), !1;
					$('#wei-shu :checkbox').each(function(i){
						if(!this.checked) weiShu.push(i);
					});
				
					for(i = 0; i < strs.length; i++){
						if(strs[i].length != num)
							return alert("请输入"+num+"位数"), !1;
						tmp = strs[i].split("");
						weiShu.forEach(function(v,i){
							tmp.splice(v, 0, '-');
						});
						for (tmpHtml = "", j = 0; j < tmp.length; j++)
							j == tmp.length-1 ? tmpHtml += "<em><i>" + tmp[j] + "</i></em>" : tmpHtml += "<em><i>" + tmp[j] + "</i></em>,";
					}
				}else{
					for (i = 0; i < strs.length; i++) {
						if (typeName == "混合" && (strs[i] = strs[i].sortAsc()), tmp = strs[i], !eval("/^" + selectedRegex + "$/").test(tmp))
							return alert("第{0}个号码[{1}]输入格式错误!".replaceFormat([i + 1, tmp])), !1;						
						if (typeName == "scczxInput" && /(\d)\1{2}/.test(tmp)) 
							return alert("混合组选不能为豹子"), !1;
						for (tmpHtml = "", j = 0; j < tmp.length; j++)
							j == tmp.length-1 ? tmpHtml += "<em><i>" + tmp[j] + "</i></em>" : tmpHtml += "<em><i>" + tmp[j] + "</i></em>,"						
					}
				}
				html += "<span>" + tmpHtml + "</span>"				
                t.append(html), $("#singleNumberInput").val("")
            }else {
				if(typeName == "combine" || typeName == "combineTwo"){
					if($(".numb_check_item:visible .nci_numbs:first>ol>li.current").length < num){
						return alert("至少选择"+num+"位!"), !1;
					}
				}else if(typeName == "allSelect" || typeName == "allSelectDs"){				
					if($(".numb_check_item>.nci_numbs>ol>li.current").length <= 0){
						return alert("请先选择号码!"), !1;
					}else if($(".numb_check_item:visible").length > num){
						if(typeName == "allSelectDs"){
							if($(".nci_numbs").has(".current").length != 2){
								return alert("请选择2位数组成的号码"), !1;
							}
						}else if($(".nci_numbs").has(".current").length != num){
							return alert("请选择"+num+"位数组成的号码"), !1;
						}					
					}else{
						n.find(".numb_check_item:visible").each(function() {
							if ($(this).find(".nci_numbs:first>ol>li.current").length <= 0)
								return alert("[{0}]号码未选择!".replaceFormat([$(this).find(".nci_title>span").text().substr(0, 2)])), hasAlert = !0, !1
						});
					}
				}
                if (hasAlert)
                    return !1;
                bettingInner = "", numbserStr = "", bettingInner += "<span>", n.find(".numb_check_item:visible").each(function(t) {
                    var u, r;
                    for (numbserStr = "", u = $(this).find("ol:first li.current"), r = 0; r < u.length; r++)
                        numbserStr += "<i>" + u.eq(r).text() + "</i>";
                    bettingInner += t >= n.find(".numb_check_item:visible").length - 1 ? "<em>" + (numbserStr?numbserStr:'-') + "</em>" : "<em>" + (numbserStr?numbserStr:'-') + "</em>,"
                }), bettingInner += "</span>", t.append(bettingInner), n.find(".numb_check_item ol li").removeClass("current"), $(".nci_sort li").removeClass("current")
            }
			h(!0)
        }), i = !1, a.bind({click: function() {
				/*m = 2 默认金额2元*/
                var v, h, u, n,m = 2;
                if (i)
                    return alert("由于网络延迟，上一次投注还没提交完成。建议继续等待，或者刷新页面从最近投注记录里确认是否已经提交投注！"), !1;
                if (v = $(this).find("span:first").hasClass("locked"), v)
                    ctx.userType == 1 ? alert("代理商不可以投注！") : alert("本期投注已经结束，请稍后投注到下一期中！");
                else {
                    if ($("#record_sum_input>span") && $("#record_sum_input>span").length > 0)
                        return $("#record_sum_input>input").focus(), !1;
                    if (t.find("span").length > 0) {
                        h = $("#singleBettingTotal").text(), u = $("#record_sum_input>input").val(), u = parseFloat(u);
                        var y = $(".traceCheckBox.checked").length, c = "当前投注没有使用追号!", a = !1, l, s = $(".tnp_content").is(":visible") && y > 0;
                        if (s) {
                            if (l = f ? $("#traceProfitMoney").text() * 1 : $("#traceTimesMoney").text() * 1, l <= 0)
                                return alert("追号总金额不可为0!"), !1;
                            a = f ? $("#profitStopWhenBonus")[0].checked : $("#timesStopWhenBonus")[0].checked, c = "使用追号"
                        }
                        n = "", n += '<div id="betting_order">', n += '<div class="betting_order_table"><table><tbody>', n += '<tr><td style="width:100px;">彩种类型：</td><td>' + _curLotteryName + "</td></tr>", n += "<tr><td>玩法类型：</td><td>" + r.siblings(".current").text() + "</td></tr>", n += "<tr><td>投注注数：</td><td>"+ h +"注</td></tr>", n += "<tr><td>投注倍数：</td><td>" + u + "倍</td></tr>",s ? (n += "<tr><td>追号期数：</td><td>" + y + "</td></tr>", n += "<tr><td>追号总金额：</td><td>" + l + "元</td></tr>", n += "<tr><td>中奖后停止追号：</td><td>" + (a ? "启用" : "未启用") + "</td></tr>", c = "当前追号模式 : " + c) : (n += "<tr><td>投注号码：</td><td>" + p() + "</td></tr>", n += "<tr><td>投注总额：</td><td>" + FormatNumber(h * u * m, 1) + "元</td></tr>"), n += "</table></tbody></div>", n += '<div class="betting_order_option">', n += '<div class="base_button_group"><div class="base_button" id="cancel_os"><button>取消</button></div><div class="base_button" id="confirm_os"><button>确认</button></div><div class="clear"></div></div>', n += "</div>", n += "</div>", $.dialogCont({model: 1,contName: "betting_order_dialog",title: s ? "追号投注订单" : "投注订单",bodyInner: n,widthSet: 300,hideModel: 1,callFunc: function() {
                                $("#cancel_os").on({click: function() {
                                        if (i)
                                            return !1;
                                        $.dialogContentSet.removeDialogCont("#betting_order_dialog")
                                    }});
                                $("#confirm_os").on({click: function() {
                                        var r, v, n;
                                        if (i)
                                            return !1;
                                        if ($("#confirm_os>button").css("cursor", "wait"), $("#cancel_os>button").css("cursor", "wait"), $("#betting_order").attr("title", "奋力提交中...请稍后!"), i = !0, r = [], v = {ruleId: o.find("li.current").attr("rule_id"),totalBetting: h,totalBeishu: u,unitPrice: m,betTypeId: $("#betting_type>ul>li.current").attr("data-id"),bonusProp: $("#double_pay").html()}, v.selNums = p(), r.push(v), r.length <= 0)
                                            return alert("没有可提交的投注项!"), !1;
                                        if (r = obj2jsonString(r), n = {bettingList: r,lotteryId: _lotteryId,curIssueNum: $(".bt_item_name>span").text(),price: m,isTraceModel: s ? "1" : "0"}, s) {
                                            var k = $("#single_pay").text() * 1, d = $("#singleTotalMoney").text() * 1, b = [], y = "", c = $(".bm_model>ul>li.current").attr("rule_id"), w = 1;
                                            if (c == 32 ? w = 5 : (c == 44 || c == 30 || c == 31 || c == 43 || c == 50) && (w = 3), $(".traceCheckBox.checked").each(function() {
                                                var t = $(this).closest("tr"), n = {issueNumber: t.attr("issuenumber"),times: t.find(".traceTimes").val()};
                                                if (w * k * u * n.times > 6e5)
                                                    return y = "追号列表中第" + n.issueNumber + "期投注可中奖金额已超过最大可中奖金额600000", !1;
                                                b.push(n)
                                            }), y != "")
                                                return i = !1, $.dialogContentSet.removeDialogCont("#betting_order_dialog"), alert(y), !1;
                                            n.traceList = obj2jsonString(b), n.isProfitSubmit = f ? "1" : "0", n.traceTotalMoney = l, n.isCheckStopWhenBonus = a ? "1" : "0", n.traceProfitPercent = $("#traceProfitPercent").val()
                                        }
                                        ctx.postTokenEx({url: "index.php?ac=Betting&op=postCode",data: n,complete: function() {
                                                i = !1, $("#confirm_os>button").css("cursor", "pointer")
                                            },success: function(n) {
                                                var i = n.infoList, u, f, r, o;
                                                for (i || (i = n), u = "", f = "", r = 0; r < i.length; r++)
                                                    o = i[r].Key.toString(), o.startWith("0,") ? f += i[r].Value + "<br/>" : u += i[r].Value + "<br/>"
                                                u == "" ? (ctx.userType == 1 ? ($("#GamePoint_id").text("0"), $("#AvailablePoint_id").text("0"), $("#FreezePoint_id").text("0")) : ($("#GamePoint_id").text(FormatNumber(n.useInfo.GamePoint,2)), $("#AvailablePoint_id").text(n.useInfo.AvailablePoint), $("#FreezePoint_id").text(n.useInfo.FreezePoint)), $.dialogContentSet.removeDialogCont("#betting_order_dialog"), t.html(""), $("#firstPage").trigger("click"), e(), $.dialogConfirm({sIconPatch: "images/dialog_confirm_icon/",sTitle: "投注成功",sBody: s ? "您的追号投注订单已经提交成功，请注意系统通知，祝您游戏愉快！" : "您的投注订单已经提交成功，请注意系统通知，祝您游戏愉快！",nWidthSet: 300,sIconName: "m_ok"})) : $.dialogConfirm({sIconPatch: "images/dialog_confirm_icon/",sTitle: "投注失败",sBody: u,nWidthSet: 300,sIconName: "m_error"})
                                            }})
                                    }})
                            }})
                    } else
                        alert("您还没有选择任何号码！请在选号面板选择您的号码，点击添加到投注列表！")
                }
            }}), r.click(function() {
            var i, f, e;
			r.removeClass("current"), $(this).addClass("current"),$(this).find("input").attr("checked", !0),$.bettingSumSlider.sliderLoad();
			i = $(this).attr("rule_id");
			var n = "index.php?ac=Betting&op=GetPlayedTpl";
			ctx.postTokenEx({url: n,data: {playId: i},complete: function() {                    
                },success: function(n) {
					$(".bm_model .current").attr("MatchType",n.matchtype).attr("SelectedRegex",n.selectedregex).attr("Num",n.num);
					if(n.matchtype == "sccInput" || n.matchtype == "scczxInput"){
						$("#selectContain").hide(), $("#inputWeiContain").hide(),$("#inputContain").show();
					}else if(n.matchtype == "sccWeiInput"){
						$("#selectContain").hide(), $("#inputContain").show(),$("#inputWeiContain").show();
					}else{
						n.matchtype == "permutaions" ? $("#inputWeiContain").show():$("#inputWeiContain").hide();
						$("#inputContain").hide(), $("#selectContain").show();
						for(i = n.panel.split(","),u.hide(),f = 0; f < i.length; f++){
							u.eq(i[f]).show();
						};
					};
					$(".play_intro_item>p").html(n.info);
                }})
        }), $("#betting_type>ul>li>span").click(function() {
            d($(this).parent()), $.bettingSumSlider.sliderLoad(), e()
        }), $("#betting_type>ul>li[data-id=" + _curBetType + "]>span").trigger("click")
    }, c = 0;
    var ft = '<%_.each(data,function(item){%>        <tr data-id="<%=item[1]%>">            <td class="center"><span class="base_strong base_orgen"><%=item[1]%></span></td>            <td class="center"><span class="base_gry"><%=item[6]%></span></td>            <td class="center"><span class="base_strong base_green"><%=item[11]%></span></td>        </tr>    <%});%>', et = '<%_.each(data,function(item){%>            <tr data-id="<%=item[1]%>">            <%if (item[20]){%>              <td class="center"><span class="base_red"><%=item[1]%></span></td>            <%}else{%>              <td class="center"><span class="base_orgen"><%=item[1]%></span></td>            <%}%>            <td class="center"><span class="base_gry"><%=item[14]%></span></td>            <td class="center"><span class="base_blue"><%=item[4]%></span></td>            <td class="center"><span class="base_green"><%=item[6]%></span></td>            <td class="center"><span><%=item[5]%></span></td>            <td class="center"><span class="base_orgen"><%=item[0].maxShow(30)%></span></td>            <td class="center"><span><%=item[3]%></span></td>            <td class="center"><span><%=item[9]%></span></td>        </tr><%});%>', ot = _.template(ft), st = _.template(et), b = [], l = [], r = 1, o = -1;
    $(document).ready(function() {
        function yt(n, t, i, r) {
            var f;
            e();
            var c = $("#single_pay").text() * 1, l = $("#record_sum_input>input").val() * 1, s = 0, o = 1, u = $(".bm_model>ul>li.current").attr("rule_id"), h = 1;
            for (u == 32 ? h = 5 : (u == 44 || u == 30 || u == 31 || u == 43 || u == 50) && (h = 3), f = 0; f < t; f++) {
                if (h * o * c * l > 6e5) {
                    alert("单注追号可中奖金额超过60万，已中止!");
                    return
                }
                n.eq(f).find(".traceTimes").val(o), n.eq(f).find(".traceCheckBox").trigger("click"), s++, s >= i && (o = o * r, s = 0)
            }
        }
        function tt(n, t, i) {
            var r, c, y, f;
            e();
            var h = $("#single_pay").text() * 1, a = $("#singleTotalMoney").text() * 1, l = $("#record_sum_input>input").val() * 1, s = a, p = h * l, b = p / s - 1;
            if (i = i / 100, b < i) {
                alert("利润率错误，当前投注达不到此利润率!");
                return
            }
            var w = 6e5 / (h * l), o = 1, u = $(".bm_model>ul>li.current").attr("rule_id"), v = 1;
            for (u == 32 ? v = 5 : (u == 44 || u == 30 || u == 31 || u == 43 || u == 50) && (v = 3), r = 0; r < t; r++) {
                if (v * o * h * l > 6e5) {
                    alert("单注追号可中奖金额超过60万，已中止!");
                    return
                }
                for (n.eq(r).find(".traceTimes").val(o), n.eq(r).find(".traceCheckBox").trigger("click"), c = -1, f = o; f < w; f++)
                    if (y = h * l * f / (s + a * f) - 1, y >= i) {
                        c = f;
                        break
                    }
                if (c == -1 && r < t - 1) {
                    alert("单注追号可中奖金额超过60万，已中止!");
                    return
                }
                o = c, s = s + a * o
            }
        }
        function dt() {
            var t, r, n, u, i, e, o;
            if ($(".numb_checked>span").length <= 0)
                return alert("您还没有选择任何号码！请在选号面板选择您的号码，点击添加到投注列表！"), !1;
            if ($("#record_sum_input>span") && $("#record_sum_input>span").length > 0)
                return $("#record_sum_input>input").focus(), !1;
            if (f) {
                if (u = ft.val(), !isInt(u) || u <= 0)
                    return alert("期数和收益率必须是正整数"), ft.focus(), !1;
                if (u = u * 1, i = rt.val(), !isInt(i) || i <= 0)
                    return alert("期数和收益率必须是正整数"), rt.focus(), !1;
                i = i * 1, e = i
            } else {
                if (t = st.val(), !isInt(t) || t <= 0)
                    return alert("期数和倍数必须是正整数"), st.focus(), !1;
                if (t = t * 1, r = ot.val(), !isInt(r) || r <= 0)
                    return alert("期数和倍数必须是正整数"), ot.focus(), !1;
                if (r = r * 1, n = et.val(), !isInt(n) || n <= 0)
                    return alert("期数和倍数必须是正整数"), et.focus(), !1;
                n = n * 1, e = t * n
            }
            if (n > 120)
                return alert("追号期数不能超过120期!"), !1;
            o = $("#trace_number_table_id tr"), o.length < e ? (e < 60 && (e = 60), ctx.postToken("/Home/GetTraceOrders/" + _lotteryId, {total: e}, function(e) {
                var o = ht({data: e});
                $("#trace_number_table_id tbody").html(o), f ? tt($("#trace_number_table_id tr"), i, u) : yt($("#trace_number_table_id tr"), n, t, r)
            })) : f ? tt(o, i, u) : yt(o, n, t, r)
        }
        function it() {
            i.find("ul li").each(function(n) {
                var t = $(this);
                if (t.css({"z-index": 9 * n}), n !== 0) {
                    t.find("em.st_remove").length == 0 && t.append('<em class="st_remove" title="移除">移除</em>'), t.find("em.st_remove").hide();
                    t.on({mouseenter: function() {
                            t.find("em.st_remove").show()
                        },mouseleave: function() {
                            t.find("em.st_remove").hide()
                        }})
                }
                t.find("em.st_remove").off().on({click: function() {
                        if (confirm("确定要移除这个收藏吗？"))
                            t.stop(!0, !1).slideUp().dequeue().fadeOut(function() {
                                t.remove()
                            });
                        else
                            return !1
                    }})
            })
        }
        var c, vt, nt;
        $(".nav>ul>li.current").removeClass("current"), $("#side_tag>ul>li").removeClass("current"), $(".formalPlay.current").length <= 0 && (location.href.toLowerCase().indexOf("?bettype") >= 0 && (c = _curLotteryName + _curBetTypeName, $(".formalPlay[playMark=" + c + "]").addClass("current")), $(".tempCurLottery").length > 0 ? $(".tempCurLottery").html('<a href="#Betting"><span class="st_home">' + _curLotteryName + "</span></a>") : $('<li class="tempCurLottery" playMark = "' + _curLotteryName + '"><a href="#Betting"><span class="st_home">' + _curLotteryName + "</span></a></li>").insertAfter($("#side_tag>ul>li:first")), $("#side_tag>ul>li.current").length <= 0 && $(".tempCurLottery").addClass("current")), $("#bt_tips a").tipsy({gravity: "s",offset: 10,opacity: 1}), ctx.userType == 1 && $("#betting_btn>span").addClass("locked"), (_lotteryId == 4 || _lotteryId == 5) && $(".bt_item_win_numbers:gt(2)").hide(), $("#tpwb_marquee").tpwbMarquee({direction: "y"}), vt = $(".bt_item_win_numbers:visible").length, $(".bt_item_last_winnumber:first").css({width: vt * 56}), ctx.receiveSocketLottery = at, ctx.receiveSocketAward = ct, d(), p(1), $("#sound_lock").bind({click: function() {
                var n = $(this).find("span:first");
                n.hasClass("locked") ? (ctx.bettingNoMediaSound = 0, n.removeClass("locked").attr({title: "点击关闭后台声音!"}), $("#buzzer").mediaAudio({fileName: "open_720"})) : (n.addClass("locked").attr({title: "点击开启后台声音!"}), ctx.bettingNoMediaSound = 1)
            }}), ctx.bettingNoMediaSound == 1 && $("#sound_lock>span").addClass("locked").attr({title: "点击开启后台声音!"}), $.bettingSumSlider.mainSet(), $.bettingJbb(), $.traceNumberPanel = function() {
            var i = $("#trace_number_panel"), t = $("#tnp_content_handle"), n = i.find(".tnp_content:first");
            t.on({click: function(t) {
                    if (n.is(":visible"))
                        e();
                    else {
                        if ($(".numb_checked>span").length <= 0)
                            return alert("您还没有选择任何号码！请在选号面板选择您的号码，点击添加到投注列表！"), !1;
                        var i = $("#trace_number_table_id tr");
                        i.length < 20 && ctx.postToken("/Home/GetTraceOrders/" + _lotteryId, {}, function(n) {
                            var t = ht({data: n});
                            $("#trace_number_table_id tbody").html(t)
                        })
                    }
                    t.preventDefault(), n.stop(!0, !1).slideToggle("fast")
                }})
        }, $.traceNumberPanel(), $("#traceNumTab").iTab({tabInt: 1});
        var bt = '<%_.each(data,function(item){%>        <tr IssueNumber="<%=item.IssueNumber%>">            <td style="width: 30px;">                <input type="checkbox" class="traceCheckBox" /></td>            <td><span><%=item.IssueNumber%></span></td>            <td>                <input type="text" class="base_text traceTimes disabled_text" value="1" disabled="disabled"/>                倍</td>            <td>&yen;<span class="traceUnitPrice">0.00</span></td>            <td><span><%=item.StopTimeEx%></span></td>        </tr>        <%});%>', ht = _.template(bt), st = $("#traceTimesSepIssue"), ot = $("#traceTimesTime"), et = $("#traceTimesIssueNum"), ft = $("#traceProfitPercent"), rt = $("#traceProfitIssueNum");
        $(".traceCheckBox").live("change", function() {
            var t = $(this).closest("tr"), n = t.find(".traceTimes"), i;
            $(this)[0].checked ? (t.find(".traceTimes").removeClass("disabled_text").removeAttr("disabled"), $(this).addClass("checked"), i = $("#singleTotalMoney").text() * 1, n.val() == "0" && n.val(1), t.find(".traceUnitPrice").html(n.val() * i)) : (n.addClass("disabled_text").attr("disabled", "disabled"), $(this).removeClass("checked"), n.val(1), t.find(".traceUnitPrice").html("0.00")), a || s()
        }), $("#traceNumTab>.tab_nav>ul>li").click(function() {
            e(), f = $("#traceNumTab>.tab_nav>ul>li.current>span").text() == "利润率追号"
        }), $(".traceTimes").live("change", function() {
            var n = $("#singleTotalMoney").text() * 1;
            $(this).closest("tr").find(".traceUnitPrice").html($(this).val() * n), s()
        }), $("#traceTimesBtn,#traceProfitBtn").click(function() {
            dt()
        }), $(window).bind("resize", function() {
            $("#inputContain>textarea").width($(".bc_sub_header").width() - 5)
        }).trigger("resize"), lt(function() {
            $("#sound_lock>span").hasClass("locked") || $("#buzzer").mediaAudio({fileName: "tips_930",loopInt: 8,isBetting: !0,backFunc: function() {
                    location.href.indexOf("Betting/") > -1 && (k(), $.bodyMsg({msg: "期号: " + u + " 已经停止投注!"}))
                }})
        }), $(".base_text").each(function() {
            var n = $(this), t = n.find("input:first");
            t.on({focus: function() {
                    n.addClass("base_text_focus")
                },blur: function() {
                    n.removeClass("base_text_focus")
                }})
        }), $(".top10Container>tr,#recentContainer>tr").die("click").live("click", function() {	
			//console.log(88);
            var n = $(this).parent().attr("class") == "top10Container", i = $(this).attr("data-id"), t = ut(i, n ? b : l), r = !n && t[15] == "未开奖";
            /*n && !t[0] || r ? GameRecordGetOrderData(t[17], n) : */$(this).orderQuery({data: t})
        }),$(".page_nav>ul>li>a").click(function() {
            switch ($(this).attr("id")) {
                case "firstPage":
                    r = 1;
                    break;
                case "prePage":
                    r -= 1, r < 1 && (r = 1);
                    break;
                case "afterPage":
                    r += 1, r > o && (r = o);
                    break;
                case "lastPage":
                    r = o
            }
            ctx.postToken("index.php?ac=GetBetOrderRecord", {lotteryId: _lotteryId,page: r}, function(n) {
				//console.log(44);
                w(n)
            })
        });
        var i = $("#side_tag"), g = i.position(), y = g.left, pt = y + i.outerWidth(), v = g.top, wt = v + i.outerHeight(), t = null, n = null, h, kt;
        sAwardUrl = null, nt = 1e3, it(), $("#betting_type ul:first li").dragbleCont({nTimeSet: nt,fDragFunc: function(i, r, u) {
                t = _curLotteryName, n = i.text(), sAwardUrl = i.attr("data-url"), h = t.trim() + n.trim(), kt = i.hasClass("current"), $("body").append('<div id="move_type"><span class="mt_award_name">' + t + '</span><span class="mt_award_model">' + n + "</span></div>"), $("#move_type").css({left: r - 55,top: u - 29,cursor: "-webkit-grab"})
            },fContDragFunc: function() {
                $("#move_type").remove()
            },fDragIngFunc: function(n, t, i) {
                $("#move_type").css({left: t - 55,top: i - 29,cursor: "-webkit-grabbing"})
            },fDragEndFunc: function(i, r, u, f, e) {
                if (f - 55 > y && f - 55 < pt && e - 29 > v && e - 29 < wt) {
                    if ($("#side_tag ul:first>li[playMark=" + h + "]").length > 0) {
                        $("#move_type").remove(), alert("当前玩法已经存在，不需要再次添加!");
                        return
                    }
                    $("#side_tag ul:first li").length >= 7 ? ($("#move_type").remove(), alert("最多只能收藏6个玩法！")) : ($("#side_tag ul:first").append('<li class="formalPlay" playMark = "' + h + '"><a href="' + sAwardUrl + '"><span class="st_award_name">' + t + '</span><span class="st_award_model">' + n + "</span></a></li>"), $("#move_type").remove(), updateUserLeftSideSetting(), it())
                } else
                    $("#move_type").stop(!0, !1).animate({left: r - 55,top: u - 29}).dequeue().fadeOut(function() {
                        $("#move_type").remove()
                    })
            }}), $(".base_select").iSelect()
    })
}
function init_tracenum(n) {
    function t(n) {
        var r = "/home/TraceNum";
        $.bodyMsg({msg: "正在查询，请稍候！！"});
        var u = $("#tracedateStart").val(), f = $("#tracedateEnd").val(), t = $("#orderId").val().trim(), e = $("#lotterySelectId").val(), i = {partial: 1,start: u,end: f,pageIndex: n,lotteryId: e};
        t && (i.orderId = t), GetPageData(r, i)
    }
    bind_select_control_value($("#lotterySelectId")[0], n * 1), $(".base_select").iSelect(), $(".GetDataByPageIndex").die("click").live("click", function() {
        t(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
    }), init_control(), $(".traceOrderClass").die("click").live("click", function() {
        var n = $(this).text();
        location.href = "#TraceNumDetail/" + n
    }), $("#btnSearch").bind({click: function() {
            t(1)
        }})
}
function init_tracenum_detail() {
    $(".traceDetailClass").die("click").live("click", function() {
        var n = $(this).attr("data-id");
        GameRecordGetOrderData(n, !1, "1")
    }), $(".checkBoxClass").live("change", function() {
        $(this)[0].checked ? $(this).closest("tr").addClass("Checked") : $(this).closest("tr").removeClass("Checked")
    }), $("#trace_number_log_all").live("change", function() {
        $(this)[0].checked ? $(".checkBoxClass").each(function() {
            $(this)[0].checked = !0, $(this).closest("tr").addClass("Checked")
        }) : $(".checkBoxClass").each(function() {
            $(this)[0].checked = !1, $(this).closest("tr").removeClass("Checked")
        })
    }), $("#refreshTraceDetail").click(function() {
        refreshGamePoin(), $(window).trigger("hashchange"), alert("刷新完成")
    }), $("#stopTraceBtn").click(function() {
        var n = "";
        if ($("tr.Checked").each(function() {
            n += ",'" + $(this).attr("issueNumber") + "'"
        }), n == "")
            return alert("没有选中取消的奖期!"), !1;
        if (!confirm("确认取消以下选中奖期？"))
            return !1;
        n != "" && (n = n.substr(1), ctx.postToken("/Home/StopTrace", {issues: n,orderId: _curTraceOrderId}, function() {
            refreshGamePoin(), $(window).trigger("hashchange")
        }))
    }), $("#returnBackBtn").click(function() {
        location.href = "#TraceNum"
    })
}
function showTraceDetailForm() {
    var n = "";
    n += '<div class="order_info"><table><tbody>', n += '<tr><td class="t_right t_title">追号编号：</td><td><span class="light_orgen">KJDKLFJSLKFI3234235432</span></td>', n += '<td class="t_right t_title">游戏：</td><td><span>重庆时时彩</span></td></tr>', n += '<tr><td class="t_right t_title">游戏用户：</td><td><span>张三</span></td>', n += '<td class="t_right t_title">玩法：</td><td><span>前三直选单式</span></td></tr>', n += '<tr><td class="t_right t_title">追号时间：</td><td><span>2014-06-18 17:11:43</span></td>', n += '<td class="t_right t_title">开始期号：</td><td><span>20140618-030</span></td></tr>', n += '<tr><td class="t_right t_title">追号时间：</td><td><span>2014-06-18 17:11:43</span></td>', n += '<td class="t_right t_title">开始期号：</td><td><span>20140618-030</span></td></tr>', n += '<tr><td class="t_right t_title">追号期数：</td><td><span>3期</span></td>', n += '<td class="t_right t_title">完成期数：</td><td><span>1期</span></td></tr>', n += '<tr><td class="t_right t_title">取消期数：</td><td><span>3期</span></td>', n += '<td class="t_right t_title">追号总金额：</td><td><span>0.6000</span></td></tr>', n += '<tr><td class="t_right t_title">完成金额：</td><td><span>0.2000</span></td>', n += '<td class="t_right t_title">取消金额：</td><td><span>0.6000</span></td></tr>', n += '<tr><td class="t_right t_title">中奖后终止：</td><td><span>是</span></td>', n += '<td class="t_right t_title">追号状态：</td><td><span>进行中</span></td></tr>', n += '<tr><td class="t_right t_title">模式：</td><td colspan="3"><span>角</span></td></tr>', n += "</tbody></table>", n += '<div class="base_button"><input type="button" value="撤单" id="remove_order" /></div>', n += "</div>", $.dialogCont({model: 1,title: "订单详情",bodyInner: n,hideModel: 1});
    $("#remove_order").on({click: function(n) {
            n.preventDefault(), confirm("确认撤销该订单？") && alert("订单以撤销！")
        }})
}
function init_control() {
    $("tbody tr:even,tfoot tr:even").addClass("dark"), $("tbody tr").hover(function() {
        $(this).addClass("hover")
    }, function() {
        $(this).removeClass("hover")
    }), $(".datepicker").datepicker({changeMonth: !0,changeYear: !0})
}
function init_gamerecord() {
    function n(n, t) {
        var u = "index.php?ac=GameRecord", r;
        $.bodyMsg({msg: "正在查询，请稍候！！"});
        var f = $("#dateStart").val(), e = $("#dateEnd").val(), o = $("#NameOrNickName").val(), i = gamerecord_username;
        t && (i = t), r = {partial: 1,start: f,end: e,pageIndex: n,username: i,keyword: o}, GetPageData(u, r)
    }
    function t(n) {
        var i = "index.php?ac=GameRecordDetail", t;
        $.bodyMsg({msg: "正在查询，请稍候！！"}), t = {partial: 1,username: n}, GetPageData(i, t)
    }
    $(document).ready(function() {
        $("#dateStart").val(gamerecord_BeginDate), $("#dateEnd").val(gamerecord_EndDate), $("#NameOrNickName").val(gamerecord_NameOrNickName), $("#li_hierarchy").html(htmlUnEncode(gamerecord_Hierarchy)), $(".GetDetailByNameClass").die("click").live("click", function() {
            t($(this).attr("user_name"))
        }), $(".GetDataByPage").die("click").live("click", function() {
            n($(this).attr("page_index"), $(this).attr("user_name"))
        }), $(".GetDataByPageIndex").die("click").live("click", function() {
            n(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
        }), init_control()
    }), $("#btnSearch").bind({click: function() {
            n(1)
        }})
}
function init_gamerecorddetail(u) {
    function n(n, t) {		
        var u = "index.php?ac=GameRecordDetail", r;
        $.bodyMsg({msg: "正在查询，请稍候！！"});
        var f = $("#dateStart").val(), e = $("#dateEnd").val(), i = gamerecorddetail_username;
        t && (i = t), r = {partial: 1,start: f,end: e,pageIndex: n,username: i}, GetPageData(u, r)
    }
	function ut(n, t) {
        for (var i = 0; i < t.length; i++)
            if (n == t[i][1])
                return t[i];
        return null
    }
    $(document).ready(function() {
		var g = gamerecorddetail_data;
		if (g.rows) l = getRecentDataToArray(g);
        $("#dateStart").val(gamerecorddetail_BeginDate), $("#dateEnd").val(gamerecorddetail_EndDate), $("#li_hierarchy").html(htmlUnEncode(gamerecorddetail_Hierarchy)), $(".GetDataByPage").die("click").live("click", function() {
            n($(this).attr("page_index"), $(this).attr("user_name"))
        }), $(".GetDataByPageIndex").die("click").live("click", function() {
            n(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
        }), $("#recentContainerDetail>tr").die("click").live("click", function(){
				i = $(this).attr("data-id"), t = ut(i,l);
				$(this).orderQuery({data: t})
		}),init_control()
    }), $("#btnSearch").bind({click: function() {
            n(1)
        }})
}
function init_userprofitloss() {
    function n(n, t) {
        var u = "index.php?ac=UserProfitLoss", r;
        $.bodyMsg({msg: "正在查询，请稍候！！"});
        var f = $("#dateStart").val(), e = $("#dateEnd").val(), o = $("#NameOrNickName").val(), i = userprofitloss_username;
        t && (i = t), r = {partial: 1,start: f,end: e,pageIndex: n,username: i,keyword: o}, GetPageData(u, r)
    }
    function t(n) {
        var i = "index.php?ac=UserProfitLossDetail", t;
        $.bodyMsg({msg: "正在查询，请稍候！！"}), t = {partial: 1,username: n}, GetPageData(i, t)
    }
    $(document).ready(function() {
        $("#dateStart").val(userprofitloss_BeginDate), $("#dateEnd").val(userprofitloss_EndDate), $("#NameOrNickName").val(userprofitloss_NameOrNickName), $("#li_hierarchy").html(htmlUnEncode(userprofitloss_Hierarchy)), $(".GetDetailByNameClass").die("click").live("click", function() {
            t($(this).attr("user_name"))
        }), $(".GetDataByPage").die("click").live("click", function() {
            n($(this).attr("page_index"), $(this).attr("user_name"))
        }), $(".GetDataByPageIndex").die("click").live("click", function() {
            n(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
        }), init_control()
    }), $("#btnSearch").bind({click: function() {
            n(1)
        }})
}
function init_userprofitlossdetail() {
    function n(n, t) {
        var u = "index.php?ac=UserProfitLossDetail", r;
        $.bodyMsg({msg: "正在查询，请稍候！！"});
        var f = $("#dateStart").val(), e = $("#dateEnd").val(), o = $("#selectType").val(), i = userprofitlossdetail_username;
        t && (i = t), r = {partial: 1,start: f,end: e,pageIndex: n,liqtype: o,username: i}, GetPageData(u, r)
    }
    $(document).ready(function() {
        $("#dateStart").val(userprofitlossdetail_BeginDate), $("#dateEnd").val(userprofitlossdetail_EndDate), $("#selectType").val(userprofitlossdetail_LiqType), $("#li_hierarchy").html(htmlUnEncode(userprofitlossdetail_Hierarchy)), $(".GetDataByPage").die("click").live("click", function() {
            n($(this).attr("page_index"), $(this).attr("user_name"))
        }), $(".GetDataByPageIndex").die("click").live("click", function() {
            n(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
        }), init_control()
    }), $("#btnSearch").bind({click: function() {
            n(1)
        }})
}
function init_orderlist() {
    function n(n) {
        var i = "index.php?ac=OrderList";
        msgTip($("#" + orderlist_ObjId), "正在查询，请稍候！", "changed_ok", 170, 170, 3e3);
        var r = $("#order_dateStart").val(), u = $("#order_dateEnd").val(), f = orderlist_Type, t = orderlist_ObjId, e = {partial: 1,start: r,end: u,pageIndex: n,type: f,status: "所有",pageSize: 5,objId: t};
        GetPageData(i, e, $("#" + t))
    }
    $(document).ready(function() {	
        $("#order_dateStart").val(orderlist_BeginDate), $("#order_dateEnd").val(orderlist_EndDate), $(".GetDataByPageIndex").die("click").live("click", function() {
            n(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
        }), init_control()
    }), $("#btnOrderListSearch").bind({click: function() {
            n(1)
        }})
}

function init_errorlist() {
    function n(n) {
        var t = "index.php?ac=ErrorList";
        msgTip($("#error_rechargeList"), "正在查询，请稍候！", "changed_ok", 170, 170, 3e3);
        var i = $("#error_dateStart").val(), r = $("#error_dateEnd").val(), u = {partial: 1,start: i,end: r,page: n};
        GetPageData(t, u, $("#error_rechargeList"))
    }
    $(document).ready(function() {
        $("#error_dateStart").val(orderlist_BeginDate), $("#error_dateEnd").val(orderlist_EndDate), $(".ErrorGetDataByPageIndex").die("click").live("click", function() {
            n(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
        }), init_control()
    }), $("#btnErrorListSearch").bind({click: function() {
            n(1)
        }})
}
function init_thirdlist() {
    function n(n) {
        var t = "index.php?ac=ThirdList";
        msgTip($("#third_rechargeList"), "正在查询，请稍候！", "changed_ok", 170, 170, 3e3);
        var i = $("#third_dateStart").val(), r = $("#third_dateEnd").val(), u = {partial: 1,start: i,end: r,page: n};
        GetPageData(t, u, $("#third_rechargeList"))
    }
    $(document).ready(function() {
        $("#third_dateStart").val(orderlist_BeginDate), $("#third_dateEnd").val(orderlist_EndDate), $(".ThirdGetDataByPageIndex").die("click").live("click", function() {
            n(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
        }), init_control()
    }), $("#btnThirdListSearch").bind({click: function() {
            n(1)
        }}), $(".needCheckThird").bind({click: function() {
            var n = $(this), t = n.attr("orderNo");
            t && ctx.postToken("/Home/ThirdQueryCheck/" + t, {}, function(t) {
                msgTip($("#recharge"), t.msg), t.msg == "充值成功!" && n.removeClass("base_red").removeClass("needCheckThird").addClass("base_green").attr("orderNo", "").html("已到帐")
            })
        }})
}
function BankTypeChange() {
    $("input[name='a']:checked").val() == "cft" ? ($("#minRechargeAmount").html("每次最低{0}元。".replaceFormat([Recharge_TenPayMinRechargeAmount])), $("#recharge_banktips").html("<p style='color: red'>温馨提示：</p><p>&nbsp;&nbsp;&nbsp;&nbsp;单笔10-20000，手续费用户自行承担。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;以上财付通帐号限本次存款用，帐号不定时更新！</p><p>&nbsp;&nbsp;&nbsp;&nbsp;每次存款前请依照本页所显示的财付通帐号入款。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;只有财付通充值到财付通，才能立即到账喔！</p>")) : ($("#minRechargeAmount").html("每次最低{0}元。".replaceFormat([Recharge_ICBCMinRechargeAmount])), $("#recharge_banktips").html("<p style='color: red'>温馨提示：</p><p>&nbsp;&nbsp;&nbsp;&nbsp;单笔最低10元，使用工行入款系统除了返还手续费以外，</p><p>&nbsp;&nbsp;&nbsp;&nbsp;还将会额外赠送1%的存款优惠，推荐使用！</p><p>&nbsp;&nbsp;&nbsp;&nbsp;以上银行帐号限本次存款用，帐号不定时更新！</p><p>&nbsp;&nbsp;&nbsp;&nbsp;每次存款前请依照本页所显示的银行帐号入款。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;只有工行充值到工行，才能立即到账喔！</p>"))
}
function init_recharge() {
    function i(t, i, r, u) {
        t = new ZeroClipboard.Client, t.setHandCursor(!0), t.addEventListener("load", function() {
        }), t.addEventListener("mouseOver", function() {
            var r = document.getElementById(i);
            t.setText(r.innerHTML)
        }), t.addEventListener("complete", function() {
            msgTip(n, "复制成功！", "changed_ok")
        }), t.glue(r, u)
    }
    var t = 1800, r = null, u = null, f = null, e = null, n = $("#recharge_rechargeform");
    $(document).ready(function() {
        $(".account_info").css({left: "573px"}), $("input[name='a'][value='gh']").attr("checked", !0), $("#minRechargeAmount").html("每次最低{0}元。".replaceFormat([Recharge_ICBCMinRechargeAmount])), $("#recharge_banktips").html("<p style='color: red'>温馨提示：</p><p>&nbsp;&nbsp;&nbsp;&nbsp;单笔最低10元，使用工行入款系统除了返还手续费以外，</p><p>&nbsp;&nbsp;&nbsp;&nbsp;还将会额外赠送1%的存款优惠，推荐使用！</p><p>&nbsp;&nbsp;&nbsp;&nbsp;以上银行帐号限本次存款用，帐号不定时更新！</p><p>&nbsp;&nbsp;&nbsp;&nbsp;每次存款前请依照本页所显示的银行帐号入款。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;只有工行充值到工行，才能立即到账喔！</p>"), $("#rm-more").unbind().bind({click: function() {
                ctx.isNormalRecharge = 1, $("#recharge-base").hide(), $("#thirdRechargeDiv").hide(), $("#normalRechargeTr").show(), $("#normalRechargeTr2").show(), $("#recharge_rechargeform").show(), BankTypeChange()
            }}), $("#rm-less").unbind().bind({click: function() {
                ctx.isNormalRecharge = 0, $("#normalRechargeTr").hide(), $("#normalRechargeTr2").hide(), $("#recharge-base").hide(), $("#thirdRechargeDiv").show(), $("#recharge_rechargeform").show(), $("#recharge_banktips").html("<p style='color: red'>温馨提示：</p><p>&nbsp;&nbsp;&nbsp;&nbsp;单笔10-5000，手续费由平台承担，</p><p>&nbsp;&nbsp;&nbsp;&nbsp;第三方支付只提供小额入款，如给您带来不便敬请见谅！</p>")
            }}), $("#returnToBase").unbind().bind({click: function() {
                $("#recharge_rechargeform").hide(), $("#recharge-base").show()
            }});
        var o = !1;
        $("#ro_submit").bind({click: function() {
                var s = $("#recharge_rechargeamount").val(), h, c, l;
                if (ctx.isNormalRecharge == 1) {
                    if (o)
                        return !1;
                    if ($("#ro_submit").css("cursor", "wait"), o = !0, $("#rb_timer").html("30分00秒"), s == "" || !isInt(s)) {
                        msgTip(n, "请输入正确的金额！", "changed_error"), $("#recharge_rechargeamount").focus(), $("#ro_submit").css("cursor", "pointer"), o = !1;
                        return
                    }
                    if ($("#recharge_fundword").val().length < 6) {
                        msgTip(n, "资金密码不能为空且不能少于6位！", "changed_error"), $("#recharge_fundword").focus(), $("#ro_submit").css("cursor", "pointer"), o = !1;
                        return
                    }
                    if (h = 1e3, $("input[name='a']:checked").val() == "cft") {
                        if (s < parseInt(Recharge_TenPayMinRechargeAmount)) {
                            msgTip(n, "最小充值金额{0}！".replaceFormat([Recharge_TenPayMinRechargeAmount]), "changed_error"), $("#recharge_rechargeamount").focus(), $("#ro_submit").css("cursor", "pointer"), o = !1;
                            return
                        }
                    } else if (s < parseInt(Recharge_ICBCMinRechargeAmount)) {
                        msgTip(n, "最小充值金额{0}！".replaceFormat([Recharge_ICBCMinRechargeAmount]), "changed_error"), $("#recharge_rechargeamount").focus(), $("#ro_submit").css("cursor", "pointer"), o = !1;
                        return
                    }
                    $("input[name='a']:checked").val() == "cft" ? (h = 1002, $("#recharge_banktype").html("腾讯财付通"), $("#recharge_rechargetype").html("<button onclick=\"window.open('https://www.tenpay.com/v2/')\">财付通网上银行</button>")) : ($("#recharge_banktype").html("中国工商银行"), $("#recharge_rechargetype").html("<button onclick=\"window.open('https://mybank1.icbc.com.cn/icbc/perbank/index.jsp')\">工行网上银行</button>")), c = {Money: s,FundPassword: $("#recharge_fundword").val(),PaymentType: h,isNormalRecharge: ctx.isNormalRecharge}, l = "/Home/RechargeSubmit", ctx.postToken(l, c, function(s) {
                        if (s.IsSuccess == 1) {
                            t = 1801, _intervalInt != undefined && window.clearTimeout(_intervalInt), _intervalInt = window.setInterval(function() {
                                if (t == 0) {
                                    $("#rb_timer").html("超时，请重新充值");
                                    return
                                }
                                t = t - 1;
                                var i = "{0}分{1}秒", r = Math.floor(t / 60), u = t % 60;
                                i = i.replaceFormat([TowLenNum(r), TowLenNum(u)]), $("#rb_timer").html(i)
                            }, 1e3), $("#recharge_amount").html(s.RechargeAmount), $("#recharge_orderid").html(s.OrderNo), $("#recharge_accountname").html(s.AccName), $("#recharge_accountno").html(s.AccNo), o = !1, $("#ro_submit").css("cursor", "pointer");
                            var h = "#gh_ai";
                            $("#recharge_type").show(), $(h).stop(!0, !1).animate({left: "0px"}, function() {
                                setTimeout(function() {
                                    i(r, "recharge_accountname", "CopyBankName", "gh_ai"), i(u, "recharge_accountno", "CopyBankAccount", "gh_ai"), i(f, "recharge_amount", "CopyBankAmount", "gh_ai"), i(e, "recharge_orderid", "CopyBankOrder", "gh_ai")
                                }, 1e3), msgTip(n, '务必复制"订单编号"到汇款页面的"附言"栏中进行粘帖（键盘CTRL+V），否则无法充值到帐', "changed_ok", undefined, 50, 8e3)
                            }), $("#recharge_rechargeamount").val(""), $("#recharge_fundword").val("")
                        } else
                            setTimeout(function() {
                                o = !1, $("#ro_submit").css("cursor", "pointer")
                            }, 2e3), msgTip(n, s.Tip, "changed_error")
                    })
                } else {
                    if (s == "" || !isInt(s)) {
                        msgTip(n, "请输入正确的金额！", "changed_error"), $("#recharge_rechargeamount").focus(), $("#ro_submit").css("cursor", "pointer"), o = !1;
                        return
                    }
                    if (s < 10 || s > 5e3) {
                        msgTip(n, "充值金额范围必须在:10~5000之间！", "changed_error"), $("#recharge_rechargeamount").focus(), $("#ro_submit").css("cursor", "pointer");
                        return
                    }
                    location.href = "/home/ThirdRecharge?amount={0}".replaceFormat([s])
                }
            }}), $("#recharge_type").iTab({tabNav: ".recharge_type_nav",tabContent: ".recharge_type_content",tabContentItem: ".rt_content_item"}), $("#gh_recharge_button").bind({click: function() {
                $.dialogContentSet.hideDialogCont("#recharge");
                var n = 0;
                $("input[name='a']:checked").val() == "cft" && (n = 1), $("#tutorial_tab").iTab({tabInt: n,tabNav: ".tutorial_tab_nav",tabContent: ".tutorial_tab_content",tabContentItem: ".tutorial_tab_content_item"}), $.dialogCont({contName: "#transfer_tutor",hideFunc: function() {
                        $.dialogCont({contName: "#recharge"})
                    }})
            }}), $("#re_load").bind("click", function() {
            $(".account_info").css({left: "573px"}), $("#recharge_type").hide()
        })
    }), $("#recharge_bind_card_option").bind({click: function() {
            $.dialogCont({contName: "#userinfo"}), $("#userinfo_tab").iTab({tabInt: 1})
        }})
}
function init_withdraw() {
    $(document).ready(function() {
        $("#withdraw_account_Title").html(withdraw_WithDrawTitle + "账号："), $("#withdraw_name_Title").html(withdraw_WithDrawTitle + "账号名："), $("#withdraw_account").html("<span class='orgen'>{0}</span>".replaceFormat([withdraw_AccoutNo])), $("#withdraw_name").html("<span class='orgen'>{0}</span>".replaceFormat([withdraw_AccoutName])), $("#withdraw_AvailablePoint").html("<span class='orgen'>{0}</span>".replaceFormat([withdraw_AvailablePoint])), $("#withdraw_times_tips").html("<span>同一银行账户，每日最多提现{0}次！</span>".replaceFormat([withdraw_MaxWithdrawCount])), $("#withdrawMinAmount_tip").html("<span>最小提现金额{0}元。</span>".replaceFormat([withdraw_MinWithdrawAmount])), $("#withdraw_tips").html(" <dl><dt><span>您<em class='light_yellow'>今日还可提现{0}次</em>，单次提现金额<em class='light_yellow'>最低{1}元，最高{2}元</em>。</span></dt></dl>".replaceFormat([withdraw_RemainWithdrawCount, withdraw_MinWithdrawAmount, withdraw_MaxWithdrawAmount])), $("#WithDraw_Money").val(""), $("#WithDraw_FundPassword").val("")
    }), $("#withdraw_cancel").bind({click: function() {
            $.dialogContentSet.hideDialogCont("#withdraw")
        }}), $("#withdraw_bind_card_option").bind({click: function() {
            $.dialogCont({contName: "#userinfo"}), $("#userinfo_tab").iTab({tabInt: 1})
        }});
    var n = !1;
    $("#withdraw_submit").bind({click: function() {
            var t, i, r;
            if (n)
                return !1;
            if ($("#withdraw_submit").css("cursor", "wait"), $("#withdraw_cancel").css("cursor", "wait"), n = !0, t = $("#withdrawal_form"), $("#WithDraw_Money").val() == "") {
                msgTip(t, "请输入正确的金额！", "changed_error"), $("#WithDraw_Money").focus(), n = !1, $("#withdraw_submit").css("cursor", "pointer"), $("#withdraw_cancel").css("cursor", "pointer");
                return
            }
            if (!isNumber($("#WithDraw_Money").val())) {
                msgTip(t, "请输入正确的金额！", "changed_error"), $("#WithDraw_Money").focus(), n = !1, $("#withdraw_submit").css("cursor", "pointer"), $("#withdraw_cancel").css("cursor", "pointer");
                return
            }
            if ($("#WithDraw_FundPassword").val().length < 6) {
                msgTip(t, "提现密码不能为空且不能少于6位！", "changed_error"), $("#WithDraw_FundPassword").focus(), n = !1, $("#withdraw_submit").css("cursor", "pointer"), $("#withdraw_cancel").css("cursor", "pointer");
                return
            }
            i = {Money: $("#WithDraw_Money").val(),FundPassword: $("#WithDraw_FundPassword").val(),__RequestVerificationToken: $("input[name=__RequestVerificationToken]").val()}, r = "index.php?ac=Withdraw&op=WithdrawalSubmit", ctx.postToken(r, i, function(i) {
                i == "申请成功,请等待管理员审批!" ? (refreshGamePoin(), msgTip(t, i, "changed_ok"), setTimeout(function() {
                    n = !1, $("#WithDraw_Money").val(""), $("#WithDraw_FundPassword").val(""), $("#withdraw_submit").css("cursor", "pointer"), $("#withdraw_cancel").css("cursor", "pointer"), $.dialogContentSet.hideDialogCont("#withdraw")
                }, 2e3)) : (setTimeout(function() {
                    n = !1, $("#withdraw_submit").css("cursor", "pointer"), $("#withdraw_cancel").css("cursor", "pointer")
                }, 2e3), msgTip(t, i, "changed_error"))
            })
        }})
}
function init_teamgamerecorddetail() {
    function n(n, t) {		
        var u = "index.php?ac=MemberManage&op=TeamGamerecord", r;
        $.bodyMsg({msg: "正在查询，请稍候！！"});
        var f = $("#dateStart").val(), e = $("#dateEnd").val(), i = gamerecorddetail_username;o = $("#lotterySelectId").val(),g = $("#NameOrNickName").val(),
        t && (i = t), r = {partial: 1,type: o,start: f,end: e,pageIndex: n,username: i,keyword: g}, GetPageData(u, r)
    }
	function ut(n, t) {
        for (var i = 0; i < t.length; i++)
            if (n == t[i][1])
                return t[i];
        return null
    }
    $(document).ready(function() {
		var g = gamerecorddetail_data;
		if (g.rows) l = getRecentDataToArray(g);
        $("#dateStart").val(gamerecorddetail_BeginDate), $("#dateEnd").val(gamerecorddetail_EndDate),$("#NameOrNickName").val(gamerecorddetail_NameOrNickName),
		$("#lotterySelectId").val(gamerecorddetail_type),
		$(".GetDataByPage").die("click").live("click", function() {
            n($(this).attr("page_index"), $(this).attr("user_name"))
        }), $(".GetDataByPageIndex").die("click").live("click", function() {
            n(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
        }), $("#recentContainerDetail>tr").die("click").live("click", function(){
				i = $(this).attr("data-id"), t = ut(i,l);
				$(this).orderQuery({data: t})
		}),init_control()
    }), $("#btnSearch").bind({click: function() {
            n(1)
        }})
}
function init_teamcashlist() {
    function n(n) {
        var i = "index.php?ac=MemberManage&op=TeamCashRecord";
        $.bodyMsg({msg: "正在查询，请稍候！！"});
        var r = $("#cash_dateStart").val(), u = $("#cash_dateEnd").val(), o = $("#NameOrNickName").val(),f = $("#selectType").val(),e = {partial: 1,type: f,start: r,end: u,pageIndex: n,keyword: o};
        GetPageData(i, e)
    }
    $(document).ready(function() {	
        $("#cash_dateStart").val(cashlist_BeginDate), $("#cash_dateEnd").val(cashlist_EndDate), $("#NameOrNickName").val(cashlist_NameOrNickName),$("#selectType").val(cashlist_type),$(".GetDataByPageIndex").die("click").live("click", function() {
            n(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
        }), init_control()
    }), $("#btnCashListSearch").bind({click: function() {
            n(1)
        }})
}
function init_teamrechargelist() {
    function n(n) {
        var i = "index.php?ac=MemberManage&op=TeamRecharge";
        $.bodyMsg({msg: "正在查询，请稍候！！"});
        var r = $("#dateStart").val(), u = $("#dateEnd").val(), o = $("#NameOrNickName").val(),f = $("#selectType").val(),e = {partial: 1,type: f,start: r,end: u,pageIndex: n,keyword: o};
        GetPageData(i, e)
    }
    $(document).ready(function() {	
        $("#dateStart").val(rechargelist_BeginDate), $("#dateEnd").val(rechargelist_EndDate), $("#NameOrNickName").val(rechargelist_NameOrNickName),$("#selectType").val(rechargelist_type),$(".GetDataByPageIndex").die("click").live("click", function() {
            n(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
        }), init_control()
    }), $("#btnSearch").bind({click: function() {
            n(1)
        }})
}
function init_teamprofitlossdetaillist() {
    function n(n, t) {
        var u = "index.php?ac=MemberManage&op=TeamCoin", r;
        $.bodyMsg({msg: "正在查询，请稍候！！"});
        var f = $("#profit_dateStart").val(), e = $("#profit_dateEnd").val(), o = $("#selectType").val(), g = $("#selectLiqType").val(), k = $("#NameOrNickName").val(),i = profitlosslist_username;
        t && (i = t), r = {partial: 1,start: f,end: e,pageIndex: n,type: o,liqtype: g,username: i,keyword:k}, GetPageData(u, r)
    }
    $(document).ready(function() {
        $("#profit_dateStart").val(profitlosslist_BeginDate), $("#profit_dateEnd").val(profitlosslist_EndDate), $("#selectLiqType").val(profitlosslist_LiqType), 
		$("#selectType").val(profitlosslist_Type),$("#NameOrNickName").val(profitlosslist_NameOrNickName), 
		$(".GetDataByPage").die("click").live("click", function() {
            n($(this).attr("page_index"), $(this).attr("user_name"))
        }), $(".GetDataByPageIndex").die("click").live("click", function() {
            n(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
        }), init_control()
    }), $("#btnProfitListSearch").bind({click: function() {
            n(1)
        }})
}
function init_teamprofitlosslist() {
    function n(n, t) {
        var u = "index.php?ac=MemberManage&op=TeamRprofitloss", r;
        $.bodyMsg({msg: "正在查询，请稍候！！"});
        var f = $("#dateStart").val(), e = $("#dateEnd").val(), k = $("#NameOrNickName").val(), o = $("#selectType").val(), i = userprofitloss_username;
        t && (i = t), r = {partial: 1,start: f,end: e,pageIndex: n,type: o,username: i,keyword:k}, GetPageData(u, r)
    }
    $(document).ready(function() {
        $("#dateStart").val(userprofitloss_BeginDate), $("#dateEnd").val(userprofitloss_EndDate), $("#NameOrNickName").val(userprofitloss_NameOrNickName), 
		$("#selectType").val(userprofitloss_Type);
		$(".GetDataByPage").die("click").live("click", function() {
            n($(this).attr("page_index"), $(this).attr("user_name"))
        }), $(".GetDataByPageIndex").die("click").live("click", function() {
            n(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
        }), init_control()
    }), $("#btnSearch").bind({click: function() {
            n(1)
        }})
}
function GetUserMemberDataByPage(n, t) {
    var r = "index.php?ac=MemberManage", i;
    $.bodyMsg({msg: "正在查询，请稍候！！"}), t != "" && (t = $("#search_user").val()), e = $("#lotterySelectId").val(),i = {partial: 1,page: n,rows: 15,QueryName: t,pidUserName: $("#pidUserName").val(),type: e}, GetPageData(r, i)
}
function GetUserMemberDataByLower(n, t) {
    var r = "index.php?ac=MemberManage&op=searchMemberLower", i;
    $.bodyMsg({msg: "正在查询，请稍候！！"}), i = {partial: 1,page: n,rows: 15,QueryName: t,pidUserName: $("#pidUserName").val()}, GetPageData(r, i)
}
function GetUserMemberLinkByPage(){
	var r = "index.php?ac=MemberManage&op=Links", i;
    $.bodyMsg({msg: "正在查询，请稍候！！"}), i = {partial: 1}, GetPageData(r, i)
}
function LoadDataByPidName(n) {
    $("#pidUserName").val(n), GetUserMemberDataByPage(1)
}
function init_memberManage() {
    function j(n, t, i, r) {
        n = new ZeroClipboard.Client, n.setHandCursor(!0), n.addEventListener("load", function() {
        }), n.addEventListener("mouseOver", function() {
            n.setText($("#spanlink").attr("data-url"))
        }), n.addEventListener("complete", function() {
            msgTip($("#searchUserTip"), "复制成功！", "changed_ok")
        }), n.glue(i, r)
    }
    var r = null, n, t, e;
	$("#lotterySelectId").val(memberManage_Type), $("#search_user").val(memberManage_NameOrNickName),
	$(".GetDataByPageIndex").die("click").live("click", function() {
        GetUserMemberDataByPage(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")))
    }), 
	$(".GetDataByPageIndexLower").die("click").live("click", function() {
        GetUserMemberDataByLower(parseInt($(this).attr("page_index")) + parseInt($(this).attr("page_change")),$("#searchname").val())
    }),
    init_control(), $("#btnSearch").bind({click: function() {
            GetUserMemberDataByPage(1, $("#search_user").val())
        }}), $(".add_lower_option").bind({click: function() {
            $.dialogCont({contName: "#add_lower"}), $("#addUserName").val(), $("#addUserPass").val(), $("#addUserConPass").val()
        }}), $(".gen_link").bind({click: function() {
            $.dialogCont({contName: "#genlink_lower"})
        }}), $(".link_edit").bind({click: function() {
            $.dialogCont({contName: "#editor_link"}), $("#editLinkId").val($(this).attr("id")),$("#editUserType").html($(this).attr("ut")), $("#editReturnPoint").val($(this).attr("rt")), $("#editNotReturnPoint").val($(this).attr("bt")),$("#el_rebate_steping_tips").html($(this).attr("rt") + "%&nbsp;&nbsp;-&nbsp;&nbsp;"+$(this).attr("rf")+"%")
        }}), $(".link_del").bind({click: function() {				
			 var i = $(this).attr("id");
			 u = {delLinkId: i}, ctx.postTokenEx({url: "index.php?ac=MemberManage&op=delLink",data: u,complete: function() {
                    n = !1
                },success: function(n) {	
					var i = n.infoList, u, r, o;
                    for (i || (i = n), u = "", r = 0; r < i.length; r++)
                         o = i[r].Key.toString(), u += i[r].Value + "<br/>"
					o == "success" ? (GetUserMemberLinkByPage(),$.bodyMsg({msg: u})) : ($.bodyMsg({msg: u}))
                }})
        }}), $(".search_link").bind({click: function() {
			 $("#searchLinkId").val($(this).attr("id")), $("#searchReturnPoint").val($(this).attr("rt")), $("#searchNotReturnPoint").val($(this).attr("bt")),$("#el_rebate_steping_tips").html($(this).attr("rt") + "%&nbsp;&nbsp;-&nbsp;&nbsp;"+$(this).attr("rf")+"%")
			var i = $(this).attr("id");
			u = {searchLinkId: i}, ctx.postTokenEx({url: "index.php?ac=MemberManage&op=searchLink",data: u,complete: function() {
                    n = !1
                },success: function(n) {	
					var i = n.infoList, u, r, o;
                    for (i || (i = n), u = "", r = 0; r < i.length; r++)
                         o = i[r].Key.toString(), u += i[r].Value + "<br/>"				
					o == "success" ? ($.dialogCont({contName: "#search_link"}),$("#spanlink").html(u),$("#spanlink").attr("data-url", u), j(r, "spanlink", "CopyrtLink", "search_link")) : ($.bodyMsg({msg: u}))
                }})
			
        }}), $(".editUser").bind({click: function() {
            $.dialogCont({contName: "#editor_lower"}), $("#editUserName").html($(this).attr("id")), $("#editUserType").html($(this).attr("ut")), $("#editReturnPoint").val($(this).attr("rt")), $("#editReturnNotPoint").val($(this).attr("bt")),$("#el_rebate_steping_tips").html($(this).attr("rt") + "%&nbsp;&nbsp;-&nbsp;&nbsp;"+$(this).attr("rf")+"%")
        }}), $(".searchUser").bind({click: function() {
			GetUserMemberDataByLower(1, $(this).attr("id"))           
        }}), $(".showDetail").bind({click: function() {
            return $("#pidUserName").val($(this).attr("id")), GetUserMemberDataByPage(1, ""), !1
        }}), n = !1, $("#lower_cofirm").bind({click: function() {
            var i = $("#addUserName").val(), u = $("#addUserReturnPoint").val(), j = $("#addUserNotReturnPoint").val(), t = $("#addUserPass").val(), f = $("#addUserConPass").val(), e = /^[A-Za-z\u4e00-\u9fa5][A-Za-z0-9\u4e00-\u9fa5]{1,19}$/, r;
            if (!e.test(i))
                return msgTip($("#addUserTip"), "用户名不合法，请重新填写！", "changed_error", 70, 100), !1;
            if (t.length == 0)
                return msgTip($("#addUserTip"), "密码不能为空！", "changed_error", 70, 100), !1;
            if (t.trim().length < 6 || t.trim().length > 16)
                return msgTip($("#addUserTip"), "密码长度不合法！", "changed_error", 70, 100), !1;
            if (t != f)
                return msgTip($("#addUserTip"), "密码不一致,请重新输入！", "changed_error", 70, 100), !1;
            if (!t.IsPassStrong())
                return msgTip($("#addUserTip"), "密码必须包含字母数字或是特殊符号！", "changed_error", 70, 100), !1;
            if (n)
                return !1;
            $("#lower_cofirm").css("cursor", "wait"), n = !0, r = {userName: i,returnPoint: u,returnNotPoint: j,userType: $('input[name="addUserType"]:checked').next().html(),userPassword: t}, ctx.postTokenEx({url: "index.php?ac=MemberManage&op=AddMember",data: r,complete: function() {
                    n = !1, $("#lower_cofirm").css("cursor", "pointer")
                },success: function(n) {
					var i = n.infoList, u, r, o;
                    for (i || (i = n), u = "", r = 0; r < i.length; r++)
                         o = i[r].Key.toString(), u += i[r].Value + "<br/>"	
					o == "success" ? ($.dialogContentSet.hideDialogCont("#add_lower"), GetUserMemberDataByPage($("#currentPage").val()), $.bodyMsg({msg: u})) : (msgTip($("#addUserTip"), u, "changed_error", 70, 100), $("#username").focus())
                }})
        }}), $("#lower_chanle").bind({click: function() {
            $.dialogContentSet.hideDialogCont("#add_lower")
        }}), $("#el_cofirm").bind({click: function() {
            var r = $("#editUserName").html(), i = $("#editReturnPoint").val(), j = $("#editReturnNotPoint").val(),t;
            if (isNaN($("#editReturnPoint").val().trim()))
                return msgTip($("#editUserTip"), "返点只能为数字！", "changed_error", 70, 100), fasle;
			if (isNaN($("#editReturnNotPoint").val().trim()))
                return msgTip($("#editUserTip"), "不定位返点只能为数字！", "changed_error", 70, 100), fasle;
            if (n)
                return !1;
            $("#el_cofirm").css("cursor", "wait"), n = !0, t = {editUserName: r,editReturnPoint: i,editReturnNotPoint: j}, ctx.postTokenEx({url: "index.php?ac=MemberManage&op=UpdateMember",data: t,complete: function() {
                    n = !1, $("#el_cofirm").css("cursor", "pointer")
                },success: function(n) {
					var i = n.infoList, u, r, o;
                    for (i || (i = n), u = "", r = 0; r < i.length; r++)
                         o = i[r].Key.toString(), u += i[r].Value + "<br/>"	
					o == "success" ? ($.dialogContentSet.hideDialogCont("#editor_lower"), GetUserMemberDataByPage($("#currentPage").val()), $.bodyMsg({msg: u})) : (msgTip($("#editUserTip"), u, "changed_error", 70, 100), $("#editReturnPoint").focus())
                }})
        }}), $("#el_link_cofirm").bind({click: function() {
            var t = $("#genlinkReturnPoint").val().trim(), e = $("#genlinkNotReturnPoint").val().trim(), f = $('input[name="addUserType"]:checked').val(), c = $("#fanDian").val().trim(), d = $("#fanDianBdw").val().trim(), u;			
            if (isNaN(t))
                return msgTip($("#genlinkTip"), "返点只能为数字！", "changed_error", 70, 100), !1;
            if (parseFloat(t) < 0 || parseFloat(t) > c)
                return msgTip($("#genlinkTip"), "请输入正确的返点！", "changed_error", 70, 100), !1;
			if (isNaN(e))
                return msgTip($("#genlinkTip"), "不定位返点只能为数字！", "changed_error", 70, 100), !1;
            if (parseFloat(e) < 0 || parseFloat(e) > d)
                return msgTip($("#genlinkTip"), "请输入正确的不定位返点！", "changed_error", 70, 100), !1;
            if (n)
                return !1;
            n = !0, u = {genlinkReturnPoint: t, genlinkNotReturnPoint: e, userType: f}, ctx.postTokenEx({url: "index.php?ac=MemberManage&op=insertLink",data: u,complete: function() {
                    n = !1
                },success: function(n) {
					var i = n.infoList, u, r, o;
                    for (i || (i = n), u = "", r = 0; r < i.length; r++)
                         o = i[r].Key.toString(), u += i[r].Value + "<br/>"			
                    o == "success" ? ($.dialogContentSet.hideDialogCont("#genlink_lower"),GetUserMemberLinkByPage(),$.bodyMsg({msg: u})) : (msgTip($("#genlinkTip"), u, "changed_error", 70, 100), $("#genlinkReturnPoint").focus());
                }})
        }}),$("#el_link_edit").bind({click: function() {
            var t = $("#editReturnPoint").val().trim(), e = $("#editNotReturnPoint").val().trim(), d = $("#editLinkId").val(),u;	
            if (isNaN(t))
                return msgTip($("#editUserTip"), "返点只能为数字！", "changed_error", 70, 100), !1;
			if (isNaN(e))
                return msgTip($("#editUserTip"), "不定位返点只能为数字！", "changed_error", 70, 100), !1;
            if (n)
                return !1;
            n = !0, u = {editlinkReturnPoint: t, editlinkNotReturnPoint: e, editLinkId: d}, ctx.postTokenEx({url: "index.php?ac=MemberManage&op=editLink",data: u,complete: function() {
                    n = !1
                },success: function(n) {	
					var i = n.infoList, u, r, o;
                    for (i || (i = n), u = "", r = 0; r < i.length; r++)
                         o = i[r].Key.toString(), u += i[r].Value + "<br/>"					
                    o == "success" ? ($.dialogContentSet.hideDialogCont("#editor_link"),GetUserMemberLinkByPage(),$.bodyMsg({msg: u})) : (msgTip($("#editUserTip"), u, "changed_error", 70, 100), $("#editReturnPoint").focus());
                }})
        }}),$("#el_chanle").bind({click: function() {
            $.dialogContentSet.hideDialogCont("#editor_lower")
        }}), $("#el_link_chanle").bind({click: function() {
            $.dialogContentSet.hideDialogCont("#search_link")
        }}),$("#el_link").bind({click: function() {
            $.dialogContentSet.hideDialogCont("#genlink_lower")
        }}),t = new Number($("#rebate_steping input[type=text]:first").val()), e = new Number($("#rebate_not_steping input[type=text]:first").val());
		$("#rebate_steping").stepingInput({nMinNumb: 0,nMaxNumb: $("#addUserReturnPoint").val(),nStartNumb: t,nStride: .1,sSuffix: "%",sLockedTag: "locked",fCallFunc: function() {
            $("#rebate_steping_tips").html("0%&nbsp;&nbsp;-&nbsp;&nbsp;" + oStepingInput.nMaxNumb + "%")
        }}),
		$("#rebate_not_steping").stepingNotInput({nMinNumb: 0,nMaxNumb: $("#addUserNotReturnPoint").val(),nStartNumb: e,nStride: .1,sSuffix: "%",sLockedTag: "locked",fCallFunc: function() {
            $("#rebate_not_steping_tips").html("0%&nbsp;&nbsp;-&nbsp;&nbsp;" + oStepingNotInput.nMaxNumb + "%")
        }})
}

function GameRecordGetOrderData(n, t, i) {
    i == undefined && (i = "0"), ctx.postToken("index.php?ac=GetBetOrderRecord", {lotteryId: "",page: 1,orderId: n,isTraceDetailId: i}, function(n) {		
        var i = getRecentDataToArray(n);
        i.length >= 1 ? (t && (i[0][2] = "匿名"), $("body").orderQuery({data: i[0]})) : alert("没有符合的数据")
    })
}
function showNewMessage(n) {
    var e, t, s;
    n.ID = parseInt(Math.random() * 1e5);
    var o = $("#UserId").val(), i = "", r = "", u = "", f = "";
    i = "sysMsg_" + o + "_" + n.ID, r = $.strCode.toEsCape(n.Title), u = $.strCode.toEsCape(n.Content), f = JSON.stringify({mid: n.ID,title: r,content: u}), $.localStorage.getItem(i) == null && sysMsgUpdate(n.ID, i, f), e = $.localStorage.getItem("sysMsgKeyIndex" + $("#UserId").val()).split(","), t = e.length, $("#system_msg_locker em:first").text(t), $("#system_msg .sm_statc:first span:last").text(t), $("#system_msg .sm_title:first ul").append($("<li>" + $.strCode.unEsCape(n.Title) + "</li>")), $("#system_msg .sm_body:first").append($('<div class="sm_item">' + $.strCode.unEsCape(n.Content) + "</div>")), s = $.cookie("msg_statc"), LoadNewMessage(), $.systemMessageFunc.newMessage(), $.systemMessageFunc.flipMessage(t), $.systemMessageFunc.scanMessage()
}
function GetRandomNum(n, t) {
    var i = t - n, r = Math.random();
    return n + Math.round(r * i)
}
function noty(n) {
    var t = 0, i = {animateOpen: "animation.open",animateClose: "animation.close",easing: "animation.easing",speed: "animation.speed",onShow: "callback.onShow",onShown: "callback.afterShow",onClose: "callback.onClose",onCloseClick: "callback.onCloseClick",onClosed: "callback.afterClose"};
    return jQuery.each(n, function(r, u) {
        if (i[r]) {
            t++;
            var f = i[r].split(".");
            n[f[0]] || (n[f[0]] = {}), n[f[0]][f[1]] = u ? u : function() {
            }, delete n[r]
        }
    }), n.closeWith || (n.closeWith = jQuery.noty.defaults.closeWith), n.hasOwnProperty("closeButton") && (t++, n.closeButton && n.closeWith.push("button"), delete n.closeButton), n.hasOwnProperty("closeOnSelfClick") && (t++, n.closeOnSelfClick && n.closeWith.push("click"), delete n.closeOnSelfClick), n.hasOwnProperty("closeOnSelfOver") && (t++, n.closeOnSelfOver && n.closeWith.push("hover"), delete n.closeOnSelfOver), n.hasOwnProperty("custom") && (t++, n.custom.container != "null" && (n.custom = n.custom.container)), n.hasOwnProperty("cssPrefix") && (t++, delete n.cssPrefix), n.theme == "noty_theme_default" && (t++, n.theme = "defaultTheme"), n.hasOwnProperty("dismissQueue") || (n.dismissQueue = jQuery.noty.defaults.dismissQueue), n.buttons && jQuery.each(n.buttons, function(n, i) {
        i.click && (t++, i.onClick = i.click, delete i.click), i.type && (t++, i.addClass = i.type, delete i.type)
    }), t && typeof console != "undefined" && console.warn && console.warn("You are using noty v2 with v1.x.x options. @deprecated until v2.2.0 - Please update your options."), jQuery.notyRenderer.init(n)
}
var hash, ctx, oStepingInput, _alert, _intervalInt, ZeroClipboard;
(function(n, t) {
    function te(n) {
        var t = ii[n] = {};
        return i.each(n.split(l), function(n, i) {
            t[i] = !0
        }), t
    }
    function su(n, r, u) {
        if (u === t && n.nodeType === 1) {
            var f = "data-" + r.replace(ar, "-$1").toLowerCase();
            if (u = n.getAttribute(f), typeof u == "string") {
                try {
                    u = u === "true" ? !0 : u === "false" ? !1 : u === "null" ? null : +u + "" === u ? +u : sr.test(u) ? i.parseJSON(u) : u
                } catch (e) {
                }
                i.data(n, r, u)
            } else
                u = t
        }
        return u
    }
    function bt(n) {
        var t;
        for (t in n)
            if ((t !== "data" || !i.isEmptyObject(n[t])) && t !== "toJSON")
                return !1;
        return !0
    }
    function p() {
        return !1
    }
    function et() {
        return !0
    }
    function k(n) {
        return !n || !n.parentNode || n.parentNode.nodeType === 11
    }
    function ou(n, t) {
        do
            n = n[t];
        while (n && n.nodeType !== 1);
        return n
    }
    function eu(n, t, r) {
        if (t = t || 0, i.isFunction(t))
            return i.grep(n, function(n, i) {
                var u = !!t.call(n, i, n);
                return u === r
            });
        if (t.nodeType)
            return i.grep(n, function(n) {
                return n === t === r
            });
        if (typeof t == "string") {
            var u = i.grep(n, function(n) {
                return n.nodeType === 1
            });
            if (ge.test(t))
                return i.filter(t, u, !r);
            t = i.filter(t, u)
        }
        return i.grep(n, function(n) {
            return i.inArray(n, t) >= 0 === r
        })
    }
    function fu(n) {
        var i = vi.split("|"), t = n.createDocumentFragment();
        if (t.createElement)
            while (i.length)
                t.createElement(i.pop());
        return t
    }
    function pf(n, t) {
        return n.getElementsByTagName(t)[0] || n.appendChild(n.ownerDocument.createElement(t))
    }
    function uu(n, t) {
        if (t.nodeType === 1 && i.hasData(n)) {
            var u, f, o, s = i._data(n), r = i._data(t, s), e = s.events;
            if (e) {
                delete r.handle, r.events = {};
                for (u in e)
                    for (f = 0, o = e[u].length; f < o; f++)
                        i.event.add(t, u, e[u][f])
            }
            r.data && (r.data = i.extend({}, r.data))
        }
    }
    function ru(n, t) {
        var r;
        t.nodeType === 1 && (t.clearAttributes && t.clearAttributes(), t.mergeAttributes && t.mergeAttributes(n), r = t.nodeName.toLowerCase(), r === "object" ? (t.parentNode && (t.outerHTML = n.outerHTML), i.support.html5Clone && n.innerHTML && !i.trim(t.innerHTML) && (t.innerHTML = n.innerHTML)) : r === "input" && tr.test(n.type) ? (t.defaultChecked = t.checked = n.checked, t.value !== n.value && (t.value = n.value)) : r === "option" ? t.selected = n.defaultSelected : r === "input" || r === "textarea" ? t.defaultValue = n.defaultValue : r === "script" && t.text !== n.text && (t.text = n.text), t.removeAttribute(i.expando))
    }
    function ct(n) {
        return typeof n.getElementsByTagName != "undefined" ? n.getElementsByTagName("*") : typeof n.querySelectorAll != "undefined" ? n.querySelectorAll("*") : []
    }
    function iu(n) {
        tr.test(n.type) && (n.defaultChecked = n.checked)
    }
    function tu(n, t) {
        if (t in n)
            return t;
        for (var r = t.charAt(0).toUpperCase() + t.slice(1), u = t, i = er.length; i--; )
            if (t = er[i] + r, t in n)
                return t;
        return u
    }
    function lt(n, t) {
        return n = t || n, i.css(n, "display") === "none" || !i.contains(n.ownerDocument, n)
    }
    function nu(n, t) {
        for (var r, o, e = [], f = 0, s = n.length; f < s; f++)
            (r = n[f], r.style) && (e[f] = i._data(r, "olddisplay"), t ? (!e[f] && r.style.display === "none" && (r.style.display = ""), r.style.display === "" && lt(r) && (e[f] = i._data(r, "olddisplay", br(r.nodeName)))) : (o = u(r, "display"), !e[f] && o !== "none" && i._data(r, "olddisplay", o)));
        for (f = 0; f < s; f++)
            (r = n[f], r.style) && (t && r.style.display !== "none" && r.style.display !== "" || (r.style.display = t ? e[f] || "" : "none"));
        return n
    }
    function gr(n, t, i) {
        var r = fo.exec(t);
        return r ? Math.max(0, r[1] - (i || 0)) + (r[2] || "px") : t
    }
    function dr(n, t, r, f) {
        for (var e = r === (f ? "border" : "content") ? 4 : t === "width" ? 1 : 0, o = 0; e < 4; e += 2)
            r === "margin" && (o += i.css(n, r + a[e], !0)), f ? (r === "content" && (o -= parseFloat(u(n, "padding" + a[e])) || 0), r !== "margin" && (o -= parseFloat(u(n, "border" + a[e] + "Width")) || 0)) : (o += parseFloat(u(n, "padding" + a[e])) || 0, r !== "padding" && (o += parseFloat(u(n, "border" + a[e] + "Width")) || 0));
        return o
    }
    function kr(n, t, r) {
        var f = t === "width" ? n.offsetWidth : n.offsetHeight, e = !0, o = i.support.boxSizing && i.css(n, "boxSizing") === "border-box";
        if (f <= 0) {
            if (f = u(n, t), (f < 0 || f == null) && (f = n.style[t]), d.test(f))
                return f;
            e = o && (i.support.boxSizingReliable || f === n.style[t]), f = parseFloat(f) || 0
        }
        return f + dr(n, t, r || (o ? "border" : "content"), e) + "px"
    }
    function br(n) {
        if (ti[n])
            return ti[n];
        var f = i("<" + n + ">").appendTo(r.body), t = f.css("display");
        return f.remove(), (t === "none" || t === "") && (w = r.body.appendChild(w || i.extend(r.createElement("iframe"), {frameBorder: 0,width: 0,height: 0})), y && w.createElement || (y = (w.contentWindow || w.contentDocument).document, y.write("<!doctype html><html><body>"), y.close()), f = y.body.appendChild(y.createElement(n)), t = u(f, "display"), r.body.removeChild(w)), ti[n] = t, t
    }
    function gt(n, t, r, u) {
        var f;
        if (i.isArray(t))
            i.each(t, function(t, i) {
                r || fe.test(n) ? u(n, i) : gt(n + "[" + (typeof i == "object" ? t : "") + "]", i, r, u)
            });
        else if (r || i.type(t) !== "object")
            u(n, t);
        else
            for (f in t)
                gt(n + "[" + f + "]", t[f], r, u)
    }
    function wr(n) {
        return function(t, r) {
            typeof t != "string" && (r = t, t = "*");
            var u, o, f, s = t.toLowerCase().split(l), e = 0, h = s.length;
            if (i.isFunction(r))
                for (; e < h; e++)
                    u = s[e], f = /^\+/.test(u), f && (u = u.substr(1) || "*"), o = n[u] = n[u] || [], o[f ? "unshift" : "push"](r)
        }
    }
    function ot(n, i, r, u, f, e) {
        f = f || i.dataTypes[0], e = e || {}, e[f] = !0;
        for (var o, s = n[f], h = 0, l = s ? s.length : 0, c = n === ni; h < l && (c || !o); h++)
            o = s[h](i, r, u), typeof o == "string" && (!c || e[o] ? o = t : (i.dataTypes.unshift(o), o = ot(n, i, r, u, o, e)));
        return (c || !o) && !e["*"] && (o = ot(n, i, r, u, "*", e)), o
    }
    function pr(n, r) {
        var u, f, e = i.ajaxSettings.flatOptions || {};
        for (u in r)
            r[u] !== t && ((e[u] ? n : f || (f = {}))[u] = r[u]);
        f && i.extend(!0, n, f)
    }
    function ue(n, i, r) {
        var o, u, e, s, h = n.contents, f = n.dataTypes, c = n.responseFields;
        for (u in c)
            u in r && (i[c[u]] = r[u]);
        while (f[0] === "*")
            f.shift(), o === t && (o = n.mimeType || i.getResponseHeader("content-type"));
        if (o)
            for (u in h)
                if (h[u] && h[u].test(o)) {
                    f.unshift(u);
                    break
                }
        if (f[0] in r)
            e = f[0];
        else {
            for (u in r) {
                if (!f[0] || n.converters[u + " " + f[0]]) {
                    e = u;
                    break
                }
                s || (s = u)
            }
            e = e || s
        }
        if (e)
            return e !== f[0] && f.unshift(e), r[e]
    }
    function lo(n, t) {
        var i, o, r, e, s = n.dataTypes.slice(), f = s[0], u = {}, h = 0;
        if (n.dataFilter && (t = n.dataFilter(t, n.dataType)), s[1])
            for (i in n.converters)
                u[i.toLowerCase()] = n.converters[i];
        for (; r = s[++h]; )
            if (r !== "*") {
                if (f !== "*" && f !== r) {
                    if (i = u[f + " " + r] || u["* " + r], !i)
                        for (o in u)
                            if (e = o.split(" "), e[1] === r && (i = u[f + " " + e[0]] || u["* " + e[0]], i)) {
                                i === !0 ? i = u[o] : u[o] !== !0 && (r = e[0], s.splice(h--, 0, r));
                                break
                            }
                    if (i !== !0)
                        if (i && n.throws)
                            t = i(t);
                        else
                            try {
                                t = i(t)
                            } catch (c) {
                                return {state: "parsererror",error: i ? c : "No conversion from " + f + " to " + r}
                            }
                }
                f = r
            }
        return {state: "success",data: t}
    }
    function yr() {
        try {
            return new n.XMLHttpRequest
        } catch (t) {
        }
    }
    function co() {
        try {
            return new n.ActiveXObject("Microsoft.XMLHTTP")
        } catch (t) {
        }
    }
    function vr() {
        return setTimeout(function() {
            ft = t
        }, 0), ft = i.now()
    }
    function eo(n, t) {
        i.each(t, function(t, i) {
            for (var u = (b[t] || []).concat(b["*"]), r = 0, f = u.length; r < f; r++)
                if (u[r].call(n, t, i))
                    return
        })
    }
    function lu(n, t, r) {
        var e, o = 0, l = 0, c = tt.length, f = i.Deferred().always(function() {
            delete h.elem
        }), h = function() {
            for (var o = ft || vr(), t = Math.max(0, u.startTime + u.duration - o), i = 1 - (t / u.duration || 0), r = 0, e = u.tweens.length; r < e; r++)
                u.tweens[r].run(i);
            return f.notifyWith(n, [u, i, t]), i < 1 && e ? t : (f.resolveWith(n, [u]), !1)
        }, u = f.promise({elem: n,props: i.extend({}, t),opts: i.extend(!0, {specialEasing: {}}, r),originalProperties: t,originalOptions: r,startTime: ft || vr(),duration: r.duration,tweens: [],createTween: function(t, r) {
                var e = i.Tween(n, u.opts, t, r, u.opts.specialEasing[t] || u.opts.easing);
                return u.tweens.push(e), e
            },stop: function(t) {
                for (var i = 0, r = t ? u.tweens.length : 0; i < r; i++)
                    u.tweens[i].run(1);
                return t ? f.resolveWith(n, [u, t]) : f.rejectWith(n, [u, t]), this
            }}), s = u.props;
        for (to(s, u.opts.specialEasing); o < c; o++)
            if (e = tt[o].call(u, n, s, u.opts), e)
                return e;
        return eo(u, s), i.isFunction(u.opts.start) && u.opts.start.call(n, u), i.fx.timer(i.extend(h, {anim: u,queue: u.opts.queue,elem: n})), u.progress(u.opts.progress).done(u.opts.done, u.opts.complete).fail(u.opts.fail).always(u.opts.always)
    }
    function to(n, t) {
        var r, f, e, u, o;
        for (r in n)
            if (f = i.camelCase(r), e = t[f], u = n[r], i.isArray(u) && (e = u[1], u = n[r] = u[0]), r !== f && (n[f] = u, delete n[r]), o = i.cssHooks[f], o && "expand" in o) {
                u = o.expand(u), delete n[f];
                for (r in u)
                    r in n || (n[r] = u[r], t[r] = e)
            } else
                t[f] = e
    }
    function no(n, t, r) {
        var o, u, a, v, h, c, f, w, s = this, e = n.style, y = {}, p = [], l = n.nodeType && lt(n);
        r.queue || (f = i._queueHooks(n, "fx"), f.unqueued == null && (f.unqueued = 0, w = f.empty.fire, f.empty.fire = function() {
            f.unqueued || w()
        }), f.unqueued++, s.always(function() {
            s.always(function() {
                f.unqueued--, i.queue(n, "fx").length || f.empty.fire()
            })
        })), n.nodeType === 1 && ("height" in t || "width" in t) && (r.overflow = [e.overflow, e.overflowX, e.overflowY], i.css(n, "display") === "inline" && i.css(n, "float") === "none" && (!i.support.inlineBlockNeedsLayout || br(n.nodeName) === "inline" ? e.display = "inline-block" : e.zoom = 1)), r.overflow && (e.overflow = "hidden", i.support.shrinkWrapBlocks || s.done(function() {
            e.overflow = r.overflow[0], e.overflowX = r.overflow[1], e.overflowY = r.overflow[2]
        }));
        for (o in t)
            if (a = t[o], df.exec(a)) {
                if (delete t[o], a === (l ? "hide" : "show"))
                    continue;
                p.push(o)
            }
        if (v = p.length, v)
            for (h = i._data(n, "fxshow") || i._data(n, "fxshow", {}), l ? i(n).show() : s.done(function() {
                i(n).hide()
            }), s.done(function() {
                var t;
                i.removeData(n, "fxshow", !0);
                for (t in y)
                    i.style(n, t, y[t])
            }), o = 0; o < v; o++)
                u = p[o], c = s.createTween(u, l ? h[u] : 0), y[u] = h[u] || i.style(n, u), u in h || (h[u] = c.start, l && (c.end = c.start, c.start = u === "width" || u === "height" ? 1 : 0))
    }
    function f(n, t, i, r, u) {
        return new f.prototype.init(n, t, i, r, u)
    }
    function ut(n, t) {
        for (var r, i = {height: n}, u = 0; u < 4; u += 2 - t)
            r = a[u], i["margin" + r] = i["padding" + r] = n;
        return t && (i.opacity = i.width = n), i
    }
    function lr(n) {
        return i.isWindow(n) ? n : n.nodeType === 9 ? n.defaultView || n.parentWindow : !1
    }
    var cr, g, r = n.document, ke = n.location, be = n.navigator, we = n.jQuery, ve = n.$, hr = Array.prototype.push, o = Array.prototype.slice, hu = Array.prototype.indexOf, ee = Object.prototype.toString, wt = Object.prototype.hasOwnProperty, cu = String.prototype.trim, i = function(n, t) {
        return new i.fn.init(n, t, cr)
    }, it = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, au = /\S/, l = /\s+/, le = au.test(" ") ? /^[\s\xA0]+|[\s\xA0]+$/g : /^\s+|\s+$/g, de = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, yu = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, pu = /^[\],:{}\s]*$/, ef = /(?:^|:|,)(?:\s*\[)+/g, of = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, sf = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, hf = /^-ms-/, bf = /-([\da-z])/gi, kf = function(n, t) {
        return (t + "").toUpperCase()
    }, rt = function() {
        r.addEventListener ? (r.removeEventListener("DOMContentLoaded", rt, !1), i.ready()) : r.readyState === "complete" && (r.detachEvent("onreadystatechange", rt), i.ready())
    }, vu = {}, ii, sr, ar, v, st, ui, vt;
    i.fn = i.prototype = {constructor: i,init: function(n, u, f) {
            var e, o, h, s;
            if (!n)
                return this;
            if (n.nodeType)
                return this.context = this[0] = n, this.length = 1, this;
            if (typeof n == "string") {
                if (e = n.charAt(0) === "<" && n.charAt(n.length - 1) === ">" && n.length >= 3 ? [null, n, null] : de.exec(n), e && (e[1] || !u)) {
                    if (e[1])
                        return u = u instanceof i ? u[0] : u, s = u && u.nodeType ? u.ownerDocument || u : r, n = i.parseHTML(e[1], s, !0), yu.test(e[1]) && i.isPlainObject(u) && this.attr.call(n, u, !0), i.merge(this, n);
                    if (o = r.getElementById(e[2]), o && o.parentNode) {
                        if (o.id !== e[2])
                            return f.find(n);
                        this.length = 1, this[0] = o
                    }
                    return this.context = r, this.selector = n, this
                }
                return !u || u.jquery ? (u || f).find(n) : this.constructor(u).find(n)
            }
            return i.isFunction(n) ? f.ready(n) : (n.selector !== t && (this.selector = n.selector, this.context = n.context), i.makeArray(n, this))
        },selector: "",jquery: "1.8.0",length: 0,size: function() {
            return this.length
        },toArray: function() {
            return o.call(this)
        },get: function(n) {
            return n == null ? this.toArray() : n < 0 ? this[this.length + n] : this[n]
        },pushStack: function(n, t, r) {
            var u = i.merge(this.constructor(), n);
            return u.prevObject = this, u.context = this.context, t === "find" ? u.selector = this.selector + (this.selector ? " " : "") + r : t && (u.selector = this.selector + "." + t + "(" + r + ")"), u
        },each: function(n, t) {
            return i.each(this, n, t)
        },ready: function(n) {
            return i.ready.promise().done(n), this
        },eq: function(n) {
            return n = +n, n === -1 ? this.slice(n) : this.slice(n, n + 1)
        },first: function() {
            return this.eq(0)
        },last: function() {
            return this.eq(-1)
        },slice: function() {
            return this.pushStack(o.apply(this, arguments), "slice", o.call(arguments).join(","))
        },map: function(n) {
            return this.pushStack(i.map(this, function(t, i) {
                return n.call(t, i, t)
            }))
        },end: function() {
            return this.prevObject || this.constructor(null)
        },push: hr,sort: [].sort,splice: [].splice}, i.fn.init.prototype = i.fn, i.extend = i.fn.extend = function() {
        var o, e, u, r, s, h, n = arguments[0] || {}, f = 1, l = arguments.length, c = !1;
        for (typeof n == "boolean" && (c = n, n = arguments[1] || {}, f = 2), typeof n != "object" && !i.isFunction(n) && (n = {}), l === f && (n = this, --f); f < l; f++)
            if ((o = arguments[f]) != null)
                for (e in o)
                    (u = n[e], r = o[e], n !== r) && (c && r && (i.isPlainObject(r) || (s = i.isArray(r))) ? (s ? (s = !1, h = u && i.isArray(u) ? u : []) : h = u && i.isPlainObject(u) ? u : {}, n[e] = i.extend(c, h, r)) : r !== t && (n[e] = r));
        return n
    }, i.extend({noConflict: function(t) {
            return n.$ === i && (n.$ = ve), t && n.jQuery === i && (n.jQuery = we), i
        },isReady: !1,readyWait: 1,holdReady: function(n) {
            n ? i.readyWait++ : i.ready(!0)
        },ready: function(n) {
            if (n === !0 ? !--i.readyWait : !i.isReady) {
                if (!r.body)
                    return setTimeout(i.ready, 1);
                (i.isReady = !0, n !== !0 && --i.readyWait > 0) || (g.resolveWith(r, [i]), i.fn.trigger && i(r).trigger("ready").off("ready"))
            }
        },isFunction: function(n) {
            return i.type(n) === "function"
        },isArray: Array.isArray || function(n) {
            return i.type(n) === "array"
        },isWindow: function(n) {
            return n != null && n == n.window
        },isNumeric: function(n) {
            return !isNaN(parseFloat(n)) && isFinite(n)
        },type: function(n) {
            return n == null ? String(n) : vu[ee.call(n)] || "object"
        },isPlainObject: function(n) {
            if (!n || i.type(n) !== "object" || n.nodeType || i.isWindow(n))
                return !1;
            try {
                if (n.constructor && !wt.call(n, "constructor") && !wt.call(n.constructor.prototype, "isPrototypeOf"))
                    return !1
            } catch (u) {
                return !1
            }
            var r;
            for (r in n)
                ;
            return r === t || wt.call(n, r)
        },isEmptyObject: function(n) {
            var t;
            for (t in n)
                return !1;
            return !0
        },error: function(n) {
            throw new Error(n);
        },parseHTML: function(n, t, u) {
            var f;
            return !n || typeof n != "string" ? null : (typeof t == "boolean" && (u = t, t = 0), t = t || r, (f = yu.exec(n)) ? [t.createElement(f[1])] : (f = i.buildFragment([n], t, u ? null : []), i.merge([], (f.cacheable ? i.clone(f.fragment) : f.fragment).childNodes)))
        },parseJSON: function(t) {
            if (!t || typeof t != "string")
                return null;
            if (t = i.trim(t), n.JSON && n.JSON.parse)
                return n.JSON.parse(t);
            if (pu.test(t.replace(of, "@").replace(sf, "]").replace(ef, "")))
                return new Function("return " + t)();
            i.error("Invalid JSON: " + t)
        },parseXML: function(r) {
            var u, f;
            if (!r || typeof r != "string")
                return null;
            try {
                n.DOMParser ? (f = new DOMParser, u = f.parseFromString(r, "text/xml")) : (u = new ActiveXObject("Microsoft.XMLDOM"), u.async = "false", u.loadXML(r))
            } catch (e) {
                u = t
            }
            return (!u || !u.documentElement || u.getElementsByTagName("parsererror").length) && i.error("Invalid XML: " + r), u
        },noop: function() {
        },globalEval: function(t) {
            t && au.test(t) && (n.execScript || function(t) {
                n.eval.call(n, t)
            })(t)
        },camelCase: function(n) {
            return n.replace(hf, "ms-").replace(bf, kf)
        },nodeName: function(n, t) {
            return n.nodeName && n.nodeName.toUpperCase() === t.toUpperCase()
        },each: function(n, r, u) {
            var f, e = 0, o = n.length, s = o === t || i.isFunction(n);
            if (u) {
                if (s) {
                    for (f in n)
                        if (r.apply(n[f], u) === !1)
                            break
                } else
                    for (; e < o; )
                        if (r.apply(n[e++], u) === !1)
                            break
            } else if (s) {
                for (f in n)
                    if (r.call(n[f], f, n[f]) === !1)
                        break
            } else
                for (; e < o; )
                    if (r.call(n[e], e, n[e++]) === !1)
                        break;
            return n
        },trim: cu ? function(n) {
            return n == null ? "" : cu.call(n)
        } : function(n) {
            return n == null ? "" : n.toString().replace(le, "")
        },makeArray: function(n, t) {
            var r, u = t || [];
            return n != null && (r = i.type(n), n.length == null || r === "string" || r === "function" || r === "regexp" || i.isWindow(n) ? hr.call(u, n) : i.merge(u, n)), u
        },inArray: function(n, t, i) {
            var r;
            if (t) {
                if (hu)
                    return hu.call(t, n, i);
                for (r = t.length, i = i ? i < 0 ? Math.max(0, r + i) : i : 0; i < r; i++)
                    if (i in t && t[i] === n)
                        return i
            }
            return -1
        },merge: function(n, i) {
            var f = i.length, u = n.length, r = 0;
            if (typeof f == "number")
                for (; r < f; r++)
                    n[u++] = i[r];
            else
                while (i[r] !== t)
                    n[u++] = i[r++];
            return n.length = u, n
        },grep: function(n, t, i) {
            var u, f = [], r = 0, e = n.length;
            for (i = !!i; r < e; r++)
                u = !!t(n[r], r), i !== u && f.push(n[r]);
            return f
        },map: function(n, r, u) {
            var f, h, e = [], s = 0, o = n.length, c = n instanceof i || o !== t && typeof o == "number" && (o > 0 && n[0] && n[o - 1] || o === 0 || i.isArray(n));
            if (c)
                for (; s < o; s++)
                    f = r(n[s], s, u), f != null && (e[e.length] = f);
            else
                for (h in n)
                    f = r(n[h], h, u), f != null && (e[e.length] = f);
            return e.concat.apply([], e)
        },guid: 1,proxy: function(n, r) {
            var f, e, u;
            return typeof r == "string" && (f = n[r], r = n, n = f), i.isFunction(n) ? (e = o.call(arguments, 2), u = function() {
                return n.apply(r, e.concat(o.call(arguments)))
            }, u.guid = n.guid = n.guid || u.guid || i.guid++, u) : t
        },access: function(n, r, u, f, e, o, s) {
            var c, l = u == null, h = 0, a = n.length;
            if (u && typeof u == "object") {
                for (h in u)
                    i.access(n, r, h, u[h], 1, o, f);
                e = 1
            } else if (f !== t) {
                if (c = s === t && i.isFunction(f), l && (c ? (c = r, r = function(n, t, r) {
                    return c.call(i(n), r)
                }) : (r.call(n, f), r = null)), r)
                    for (; h < a; h++)
                        r(n[h], u, c ? f.call(n[h], h, r(n[h], u)) : f, s);
                e = 1
            }
            return e ? n : l ? r.call(n) : a ? r(n[0], u) : o
        },now: function() {
            return +new Date
        }}), i.ready.promise = function(t) {
        if (!g)
            if (g = i.Deferred(), r.readyState === "complete" || r.readyState !== "loading" && r.addEventListener)
                setTimeout(i.ready, 1);
            else if (r.addEventListener)
                r.addEventListener("DOMContentLoaded", rt, !1), n.addEventListener("load", i.ready, !1);
            else {
                r.attachEvent("onreadystatechange", rt), n.attachEvent("onload", i.ready);
                var u = !1;
                try {
                    u = n.frameElement == null && r.documentElement
                } catch (e) {
                }
                u && u.doScroll && function f() {
                    if (!i.isReady) {
                        try {
                            u.doScroll("left")
                        } catch (n) {
                            return setTimeout(f, 50)
                        }
                        i.ready()
                    }
                }()
            }
        return g.promise(t)
    }, i.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(n, t) {
        vu["[object " + t + "]"] = t.toLowerCase()
    }), cr = i(r), ii = {}, i.Callbacks = function(n) {
        n = typeof n == "string" ? ii[n] || te(n) : i.extend({}, n);
        var f, c, o, l, s, e, r = [], u = !n.once && [], a = function(t) {
            for (f = n.memory && t, c = !0, e = l || 0, l = 0, s = r.length, o = !0; r && e < s; e++)
                if (r[e].apply(t[0], t[1]) === !1 && n.stopOnFalse) {
                    f = !1;
                    break
                }
            o = !1, r && (u ? u.length && a(u.shift()) : f ? r = [] : h.disable())
        }, h = {add: function() {
                if (r) {
                    var t = r.length;
                    (function u(t) {
                        i.each(t, function(t, f) {
                            i.isFunction(f) && (!n.unique || !h.has(f)) ? r.push(f) : f && f.length && u(f)
                        })
                    })(arguments), o ? s = r.length : f && (l = t, a(f))
                }
                return this
            },remove: function() {
                return r && i.each(arguments, function(n, t) {
                    for (var u; (u = i.inArray(t, r, u)) > -1; )
                        r.splice(u, 1), o && (u <= s && s--, u <= e && e--)
                }), this
            },has: function(n) {
                return i.inArray(n, r) > -1
            },empty: function() {
                return r = [], this
            },disable: function() {
                return r = u = f = t, this
            },disabled: function() {
                return !r
            },lock: function() {
                return u = t, f || h.disable(), this
            },locked: function() {
                return !u
            },fireWith: function(n, t) {
                return t = t || [], t = [n, t.slice ? t.slice() : t], r && (!c || u) && (o ? u.push(t) : a(t)), this
            },fire: function() {
                return h.fireWith(this, arguments), this
            },fired: function() {
                return !!c
            }};
        return h
    }, i.extend({Deferred: function(n) {
            var u = [["resolve", "done", i.Callbacks("once memory"), "resolved"], ["reject", "fail", i.Callbacks("once memory"), "rejected"], ["notify", "progress", i.Callbacks("memory")]], f = "pending", r = {state: function() {
                    return f
                },always: function() {
                    return t.done(arguments).fail(arguments), this
                },then: function() {
                    var n = arguments;
                    return i.Deferred(function(r) {
                        i.each(u, function(u, f) {
                            var e = f[0], o = n[u];
                            t[f[1]](i.isFunction(o) ? function() {
                                var n = o.apply(this, arguments);
                                n && i.isFunction(n.promise) ? n.promise().done(r.resolve).fail(r.reject).progress(r.notify) : r[e + "With"](this === t ? r : this, [n])
                            } : r[e])
                        }), n = null
                    }).promise()
                },promise: function(n) {
                    return typeof n == "object" ? i.extend(n, r) : r
                }}, t = {};
            return r.pipe = r.then, i.each(u, function(n, i) {
                var e = i[2], o = i[3];
                r[i[1]] = e.add, o && e.add(function() {
                    f = o
                }, u[n ^ 1][2].disable, u[2][2].lock), t[i[0]] = e.fire, t[i[0] + "With"] = e.fireWith
            }), r.promise(t), n && n.call(t, t), t
        },when: function(n) {
            var t = 0, u = o.call(arguments), r = u.length, e = r !== 1 || n && i.isFunction(n.promise) ? r : 0, f = e === 1 ? n : i.Deferred(), c = function(n, t, i) {
                return function(r) {
                    t[n] = this, i[n] = arguments.length > 1 ? o.call(arguments) : r, i === s ? f.notifyWith(t, i) : --e || f.resolveWith(t, i)
                }
            }, s, l, h;
            if (r > 1)
                for (s = new Array(r), l = new Array(r), h = new Array(r); t < r; t++)
                    u[t] && i.isFunction(u[t].promise) ? u[t].promise().done(c(t, h, u)).fail(f.reject).progress(c(t, l, s)) : --e;
            return e || f.resolveWith(h, u), f.promise()
        }}), i.support = function() {
        var u, h, e, c, l, f, o, a, v, s, y, t = r.createElement("div");
        if (t.setAttribute("className", "t"), t.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", h = t.getElementsByTagName("*"), e = t.getElementsByTagName("a")[0], e.style.cssText = "top:1px;float:left;opacity:.5", !h || !h.length || !e)
            return {};
        c = r.createElement("select"), l = c.appendChild(r.createElement("option")), f = t.getElementsByTagName("input")[0], u = {leadingWhitespace: t.firstChild.nodeType === 3,tbody: !t.getElementsByTagName("tbody").length,htmlSerialize: !!t.getElementsByTagName("link").length,style: /top/.test(e.getAttribute("style")),hrefNormalized: e.getAttribute("href") === "/a",opacity: /^0.5/.test(e.style.opacity),cssFloat: !!e.style.cssFloat,checkOn: f.value === "on",optSelected: l.selected,getSetAttribute: t.className !== "t",enctype: !!r.createElement("form").enctype,html5Clone: r.createElement("nav").cloneNode(!0).outerHTML !== "<:nav></:nav>",boxModel: r.compatMode === "CSS1Compat",submitBubbles: !0,changeBubbles: !0,focusinBubbles: !1,deleteExpando: !0,noCloneEvent: !0,inlineBlockNeedsLayout: !1,shrinkWrapBlocks: !1,reliableMarginRight: !0,boxSizingReliable: !0,pixelPosition: !1}, f.checked = !0, u.noCloneChecked = f.cloneNode(!0).checked, c.disabled = !0, u.optDisabled = !l.disabled;
        try {
            delete t.test
        } catch (p) {
            u.deleteExpando = !1
        }
        if (!t.addEventListener && t.attachEvent && t.fireEvent && (t.attachEvent("onclick", y = function() {
            u.noCloneEvent = !1
        }), t.cloneNode(!0).fireEvent("onclick"), t.detachEvent("onclick", y)), f = r.createElement("input"), f.value = "t", f.setAttribute("type", "radio"), u.radioValue = f.value === "t", f.setAttribute("checked", "checked"), f.setAttribute("name", "t"), t.appendChild(f), o = r.createDocumentFragment(), o.appendChild(t.lastChild), u.checkClone = o.cloneNode(!0).cloneNode(!0).lastChild.checked, u.appendChecked = f.checked, o.removeChild(f), o.appendChild(t), t.attachEvent)
            for (v in {submit: !0,change: !0,focusin: !0})
                a = "on" + v, s = a in t, s || (t.setAttribute(a, "return;"), s = typeof t[a] == "function"), u[v + "Bubbles"] = s;
        return i(function() {
            var i, t, f, e, h = "padding:0;margin:0;border:0;display:block;overflow:hidden;", o = r.getElementsByTagName("body")[0];
            o && (i = r.createElement("div"), i.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px", o.insertBefore(i, o.firstChild), t = r.createElement("div"), i.appendChild(t), t.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", f = t.getElementsByTagName("td"), f[0].style.cssText = "padding:0;margin:0;border:0;display:none", s = f[0].offsetHeight === 0, f[0].style.display = "", f[1].style.display = "none", u.reliableHiddenOffsets = s && f[0].offsetHeight === 0, t.innerHTML = "", t.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;", u.boxSizing = t.offsetWidth === 4, u.doesNotIncludeMarginInBodyOffset = o.offsetTop !== 1, n.getComputedStyle && (u.pixelPosition = (n.getComputedStyle(t, null) || {}).top !== "1%", u.boxSizingReliable = (n.getComputedStyle(t, null) || {width: "4px"}).width === "4px", e = r.createElement("div"), e.style.cssText = t.style.cssText = h, e.style.marginRight = e.style.width = "0", t.style.width = "1px", t.appendChild(e), u.reliableMarginRight = !parseFloat((n.getComputedStyle(e, null) || {}).marginRight)), typeof t.style.zoom != "undefined" && (t.innerHTML = "", t.style.cssText = h + "width:1px;padding:1px;display:inline;zoom:1", u.inlineBlockNeedsLayout = t.offsetWidth === 3, t.style.display = "block", t.style.overflow = "visible", t.innerHTML = "<div></div>", t.firstChild.style.width = "5px", u.shrinkWrapBlocks = t.offsetWidth !== 3, i.style.zoom = 1), o.removeChild(i), i = t = f = e = null)
        }), o.removeChild(t), h = e = c = l = f = o = t = null, u
    }(), sr = /^(?:\{.*\}|\[.*\])$/, ar = /([A-Z])/g, i.extend({cache: {},deletedIds: [],uuid: 0,expando: "jQuery" + (i.fn.jquery + Math.random()).replace(/\D/g, ""),noData: {embed: !0,object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet: !0},hasData: function(n) {
            return n = n.nodeType ? i.cache[n[i.expando]] : n[i.expando], !!n && !bt(n)
        },data: function(n, r, u, f) {
            if (i.acceptData(n)) {
                var s, h, c = i.expando, a = typeof r == "string", l = n.nodeType, o = l ? i.cache : n, e = l ? n[c] : n[c] && c;
                if (e && o[e] && (f || o[e].data) || !a || u !== t)
                    return e || (l ? n[c] = e = i.deletedIds.pop() || ++i.uuid : e = c), o[e] || (o[e] = {}, l || (o[e].toJSON = i.noop)), (typeof r == "object" || typeof r == "function") && (f ? o[e] = i.extend(o[e], r) : o[e].data = i.extend(o[e].data, r)), s = o[e], f || (s.data || (s.data = {}), s = s.data), u !== t && (s[i.camelCase(r)] = u), a ? (h = s[r], h == null && (h = s[i.camelCase(r)])) : h = s, h
            }
        },removeData: function(n, t, r) {
            if (i.acceptData(n)) {
                var e, o, h, s = n.nodeType, u = s ? i.cache : n, f = s ? n[i.expando] : i.expando;
                if (u[f]) {
                    if (t && (e = r ? u[f] : u[f].data, e)) {
                        for (i.isArray(t) || (t in e ? t = [t] : (t = i.camelCase(t), t = t in e ? [t] : t.split(" "))), o = 0, h = t.length; o < h; o++)
                            delete e[t[o]];
                        if (!(r ? bt : i.isEmptyObject)(e))
                            return
                    }
                    (r || (delete u[f].data, bt(u[f]))) && (s ? i.cleanData([n], !0) : i.support.deleteExpando || u != u.window ? delete u[f] : u[f] = null)
                }
            }
        },_data: function(n, t, r) {
            return i.data(n, t, r, !0)
        },acceptData: function(n) {
            var t = n.nodeName && i.noData[n.nodeName.toLowerCase()];
            return !t || t !== !0 && n.getAttribute("classid") === t
        }}), i.fn.extend({data: function(n, r) {
            var u, s, h, o, l, e = this[0], c = 0, f = null;
            if (n === t) {
                if (this.length && (f = i.data(e), e.nodeType === 1 && !i._data(e, "parsedAttrs"))) {
                    for (h = e.attributes, l = h.length; c < l; c++)
                        o = h[c].name, o.indexOf("data-") === 0 && (o = i.camelCase(o.substring(5)), su(e, o, f[o]));
                    i._data(e, "parsedAttrs", !0)
                }
                return f
            }
            return typeof n == "object" ? this.each(function() {
                i.data(this, n)
            }) : (u = n.split(".", 2), u[1] = u[1] ? "." + u[1] : "", s = u[1] + "!", i.access(this, function(r) {
                if (r === t)
                    return f = this.triggerHandler("getData" + s, [u[0]]), f === t && e && (f = i.data(e, n), f = su(e, n, f)), f === t && u[1] ? this.data(u[0]) : f;
                u[1] = r, this.each(function() {
                    var t = i(this);
                    t.triggerHandler("setData" + s, u), i.data(this, n, r), t.triggerHandler("changeData" + s, u)
                })
            }, null, r, arguments.length > 1, null, !1))
        },removeData: function(n) {
            return this.each(function() {
                i.removeData(this, n)
            })
        }}), i.extend({queue: function(n, t, r) {
            var u;
            if (n)
                return t = (t || "fx") + "queue", u = i._data(n, t), r && (!u || i.isArray(r) ? u = i._data(n, t, i.makeArray(r)) : u.push(r)), u || []
        },dequeue: function(n, t) {
            t = t || "fx";
            var r = i.queue(n, t), u = r.shift(), f = i._queueHooks(n, t), e = function() {
                i.dequeue(n, t)
            };
            u === "inprogress" && (u = r.shift()), u && (t === "fx" && r.unshift("inprogress"), delete f.stop, u.call(n, e, f)), !r.length && f && f.empty.fire()
        },_queueHooks: function(n, t) {
            var r = t + "queueHooks";
            return i._data(n, r) || i._data(n, r, {empty: i.Callbacks("once memory").add(function() {
                    i.removeData(n, t + "queue", !0), i.removeData(n, r, !0)
                })})
        }}), i.fn.extend({queue: function(n, r) {
            var u = 2;
            return typeof n != "string" && (r = n, n = "fx", u--), arguments.length < u ? i.queue(this[0], n) : r === t ? this : this.each(function() {
                var t = i.queue(this, n, r);
                i._queueHooks(this, n), n === "fx" && t[0] !== "inprogress" && i.dequeue(this, n)
            })
        },dequeue: function(n) {
            return this.each(function() {
                i.dequeue(this, n)
            })
        },delay: function(n, t) {
            return n = i.fx ? i.fx.speeds[n] || n : n, t = t || "fx", this.queue(t, function(t, i) {
                var r = setTimeout(t, n);
                i.stop = function() {
                    clearTimeout(r)
                }
            })
        },clearQueue: function(n) {
            return this.queue(n || "fx", [])
        },promise: function(n, r) {
            var u, e = 1, o = i.Deferred(), f = this, s = this.length, h = function() {
                --e || o.resolveWith(f, [f])
            };
            for (typeof n != "string" && (r = n, n = t), n = n || "fx"; s--; )
                (u = i._data(f[s], n + "queueHooks")) && u.empty && (e++, u.empty.add(h));
            return h(), o.promise(r)
        }});
    var s, ri, fi, ei = /[\t\r\n]/g, wf = /\r/g, yf = /^(?:button|input)$/i, af = /^(?:button|input|object|select|textarea)$/i, cf = /^a(?:rea|)$/i, oi = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, or = i.support.getSetAttribute;
    i.fn.extend({attr: function(n, t) {
            return i.access(this, i.attr, n, t, arguments.length > 1)
        },removeAttr: function(n) {
            return this.each(function() {
                i.removeAttr(this, n)
            })
        },prop: function(n, t) {
            return i.access(this, i.prop, n, t, arguments.length > 1)
        },removeProp: function(n) {
            return n = i.propFix[n] || n, this.each(function() {
                try {
                    this[n] = t, delete this[n]
                } catch (i) {
                }
            })
        },addClass: function(n) {
            var r, f, o, t, e, u, s;
            if (i.isFunction(n))
                return this.each(function(t) {
                    i(this).addClass(n.call(this, t, this.className))
                });
            if (n && typeof n == "string")
                for (r = n.split(l), f = 0, o = this.length; f < o; f++)
                    if (t = this[f], t.nodeType === 1)
                        if (t.className || r.length !== 1) {
                            for (e = " " + t.className + " ", u = 0, s = r.length; u < s; u++)
                                ~e.indexOf(" " + r[u] + " ") || (e += r[u] + " ");
                            t.className = i.trim(e)
                        } else
                            t.className = n;
            return this
        },removeClass: function(n) {
            var e, r, u, f, s, o, h;
            if (i.isFunction(n))
                return this.each(function(t) {
                    i(this).removeClass(n.call(this, t, this.className))
                });
            if (n && typeof n == "string" || n === t)
                for (e = (n || "").split(l), o = 0, h = this.length; o < h; o++)
                    if (u = this[o], u.nodeType === 1 && u.className) {
                        for (r = (" " + u.className + " ").replace(ei, " "), f = 0, s = e.length; f < s; f++)
                            while (r.indexOf(" " + e[f] + " ") > -1)
                                r = r.replace(" " + e[f] + " ", " ");
                        u.className = n ? i.trim(r) : ""
                    }
            return this
        },toggleClass: function(n, t) {
            var r = typeof n, u = typeof t == "boolean";
            return i.isFunction(n) ? this.each(function(r) {
                i(this).toggleClass(n.call(this, r, this.className, t), t)
            }) : this.each(function() {
                if (r === "string")
                    for (var f, s = 0, o = i(this), e = t, h = n.split(l); f = h[s++]; )
                        e = u ? e : !o.hasClass(f), o[e ? "addClass" : "removeClass"](f);
                else
                    (r === "undefined" || r === "boolean") && (this.className && i._data(this, "__className__", this.className), this.className = this.className || n === !1 ? "" : i._data(this, "__className__") || "")
            })
        },hasClass: function(n) {
            for (var i = " " + n + " ", t = 0, r = this.length; t < r; t++)
                if (this[t].nodeType === 1 && (" " + this[t].className + " ").replace(ei, " ").indexOf(i) > -1)
                    return !0;
            return !1
        },val: function(n) {
            var r, u, e, f = this[0];
            return arguments.length ? (e = i.isFunction(n), this.each(function(u) {
                var f, o = i(this);
                this.nodeType === 1 && (f = e ? n.call(this, u, o.val()) : n, f == null ? f = "" : typeof f == "number" ? f += "" : i.isArray(f) && (f = i.map(f, function(n) {
                    return n == null ? "" : n + ""
                })), r = i.valHooks[this.type] || i.valHooks[this.nodeName.toLowerCase()], r && "set" in r && r.set(this, f, "value") !== t || (this.value = f))
            })) : f ? (r = i.valHooks[f.type] || i.valHooks[f.nodeName.toLowerCase()], r && "get" in r && (u = r.get(f, "value")) !== t ? u : (u = f.value, typeof u == "string" ? u.replace(wf, "") : u == null ? "" : u)) : void 0
        }}), i.extend({valHooks: {option: {get: function(n) {
                    var t = n.attributes.value;
                    return !t || t.specified ? n.value : n.text
                }},select: {get: function(n) {
                    var o, r, h, t, u = n.selectedIndex, s = [], f = n.options, e = n.type === "select-one";
                    if (u < 0)
                        return null;
                    for (r = e ? u : 0, h = e ? u + 1 : f.length; r < h; r++)
                        if (t = f[r], t.selected && (i.support.optDisabled ? !t.disabled : t.getAttribute("disabled") === null) && (!t.parentNode.disabled || !i.nodeName(t.parentNode, "optgroup"))) {
                            if (o = i(t).val(), e)
                                return o;
                            s.push(o)
                        }
                    return e && !s.length && f.length ? i(f[u]).val() : s
                },set: function(n, t) {
                    var r = i.makeArray(t);
                    return i(n).find("option").each(function() {
                        this.selected = i.inArray(i(this).val(), r) >= 0
                    }), r.length || (n.selectedIndex = -1), r
                }}},attrFn: {},attr: function(n, r, u, f) {
            var e, o, h, c = n.nodeType;
            if (n && c !== 3 && c !== 8 && c !== 2) {
                if (f && i.isFunction(i.fn[r]))
                    return i(n)[r](u);
                if (typeof n.getAttribute == "undefined")
                    return i.prop(n, r, u);
                if (h = c !== 1 || !i.isXMLDoc(n), h && (r = r.toLowerCase(), o = i.attrHooks[r] || (oi.test(r) ? ri : s)), u !== t) {
                    if (u === null) {
                        i.removeAttr(n, r);
                        return
                    }
                    return o && "set" in o && h && (e = o.set(n, u, r)) !== t ? e : (n.setAttribute(r, "" + u), u)
                }
                return o && "get" in o && h && (e = o.get(n, r)) !== null ? e : (e = n.getAttribute(r), e === null ? t : e)
            }
        },removeAttr: function(n, t) {
            var u, f, r, e, o = 0;
            if (t && n.nodeType === 1)
                for (f = t.split(l); o < f.length; o++)
                    r = f[o], r && (u = i.propFix[r] || r, e = oi.test(r), e || i.attr(n, r, ""), n.removeAttribute(or ? r : u), e && u in n && (n[u] = !1))
        },attrHooks: {type: {set: function(n, t) {
                    if (yf.test(n.nodeName) && n.parentNode)
                        i.error("type property can't be changed");
                    else if (!i.support.radioValue && t === "radio" && i.nodeName(n, "input")) {
                        var r = n.value;
                        return n.setAttribute("type", t), r && (n.value = r), t
                    }
                }},value: {get: function(n, t) {
                    return s && i.nodeName(n, "button") ? s.get(n, t) : t in n ? n.value : null
                },set: function(n, t, r) {
                    if (s && i.nodeName(n, "button"))
                        return s.set(n, t, r);
                    n.value = t
                }}},propFix: {tabindex: "tabIndex",readonly: "readOnly","for": "htmlFor","class": "className",maxlength: "maxLength",cellspacing: "cellSpacing",cellpadding: "cellPadding",rowspan: "rowSpan",colspan: "colSpan",usemap: "useMap",frameborder: "frameBorder",contenteditable: "contentEditable"},prop: function(n, r, u) {
            var e, f, s, o = n.nodeType;
            if (n && o !== 3 && o !== 8 && o !== 2)
                return s = o !== 1 || !i.isXMLDoc(n), s && (r = i.propFix[r] || r, f = i.propHooks[r]), u !== t ? f && "set" in f && (e = f.set(n, u, r)) !== t ? e : n[r] = u : f && "get" in f && (e = f.get(n, r)) !== null ? e : n[r]
        },propHooks: {tabIndex: {get: function(n) {
                    var i = n.getAttributeNode("tabindex");
                    return i && i.specified ? parseInt(i.value, 10) : af.test(n.nodeName) || cf.test(n.nodeName) && n.href ? 0 : t
                }}}}), ri = {get: function(n, r) {
            var u, f = i.prop(n, r);
            return f === !0 || typeof f != "boolean" && (u = n.getAttributeNode(r)) && u.nodeValue !== !1 ? r.toLowerCase() : t
        },set: function(n, t, r) {
            var u;
            return t === !1 ? i.removeAttr(n, r) : (u = i.propFix[r] || r, u in n && (n[u] = !0), n.setAttribute(r, r.toLowerCase())), r
        }}, or || (fi = {name: !0,id: !0,coords: !0}, s = i.valHooks.button = {get: function(n, i) {
            var r;
            return r = n.getAttributeNode(i), r && (fi[i] ? r.value !== "" : r.specified) ? r.value : t
        },set: function(n, t, i) {
            var u = n.getAttributeNode(i);
            return u || (u = r.createAttribute(i), n.setAttributeNode(u)), u.value = t + ""
        }}, i.each(["width", "height"], function(n, t) {
        i.attrHooks[t] = i.extend(i.attrHooks[t], {set: function(n, i) {
                if (i === "")
                    return n.setAttribute(t, "auto"), i
            }})
    }), i.attrHooks.contenteditable = {get: s.get,set: function(n, t, i) {
            t === "" && (t = "false"), s.set(n, t, i)
        }}), i.support.hrefNormalized || i.each(["href", "src", "width", "height"], function(n, r) {
        i.attrHooks[r] = i.extend(i.attrHooks[r], {get: function(n) {
                var i = n.getAttribute(r, 2);
                return i === null ? t : i
            }})
    }), i.support.style || (i.attrHooks.style = {get: function(n) {
            return n.style.cssText.toLowerCase() || t
        },set: function(n, t) {
            return n.style.cssText = "" + t
        }}), i.support.optSelected || (i.propHooks.selected = i.extend(i.propHooks.selected, {get: function(n) {
            var t = n.parentNode;
            return t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex), null
        }})), i.support.enctype || (i.propFix.enctype = "encoding"), i.support.checkOn || i.each(["radio", "checkbox"], function() {
        i.valHooks[this] = {get: function(n) {
                return n.getAttribute("value") === null ? "on" : n.value
            }}
    }), i.each(["radio", "checkbox"], function() {
        i.valHooks[this] = i.extend(i.valHooks[this], {set: function(n, t) {
                if (i.isArray(t))
                    return n.checked = i.inArray(i(n).val(), t) >= 0
            }})
    });
    var yt = /^(?:textarea|input|select)$/i, hi = /^([^\.]*|)(?:\.(.+)|)$/, ff = /(?:^|\s)hover(\.\S+|)\b/, tf = /^key/, wu = /^(?:mouse|contextmenu)|click/, ci = /^(?:focusinfocus|focusoutblur)$/, li = function(n) {
        return i.event.special.hover ? n : n.replace(ff, "mouseenter$1 mouseleave$1")
    };
    i.event = {add: function(n, r, u, f, e) {
            var a, s, v, y, p, o, b, l, w, c, h;
            if (n.nodeType !== 3 && n.nodeType !== 8 && r && u && (a = i._data(n))) {
                for (u.handler && (w = u, u = w.handler, e = w.selector), u.guid || (u.guid = i.guid++), v = a.events, v || (a.events = v = {}), s = a.handle, s || (a.handle = s = function(n) {
                    return typeof i != "undefined" && (!n || i.event.triggered !== n.type) ? i.event.dispatch.apply(s.elem, arguments) : t
                }, s.elem = n), r = i.trim(li(r)).split(" "), y = 0; y < r.length; y++)
                    p = hi.exec(r[y]) || [], o = p[1], b = (p[2] || "").split(".").sort(), h = i.event.special[o] || {}, o = (e ? h.delegateType : h.bindType) || o, h = i.event.special[o] || {}, l = i.extend({type: o,origType: p[1],data: f,handler: u,guid: u.guid,selector: e,namespace: b.join(".")}, w), c = v[o], c || (c = v[o] = [], c.delegateCount = 0, h.setup && h.setup.call(n, f, b, s) !== !1 || (n.addEventListener ? n.addEventListener(o, s, !1) : n.attachEvent && n.attachEvent("on" + o, s))), h.add && (h.add.call(n, l), l.handler.guid || (l.handler.guid = u.guid)), e ? c.splice(c.delegateCount++, 0, l) : c.push(l), i.event.global[o] = !0;
                n = null
            }
        },global: {},remove: function(n, t, r, u, f) {
            var v, p, e, b, c, w, y, l, h, o, s, a = i.hasData(n) && i._data(n);
            if (a && (l = a.events)) {
                for (t = i.trim(li(t || "")).split(" "), v = 0; v < t.length; v++) {
                    if (p = hi.exec(t[v]) || [], e = b = p[1], c = p[2], !e) {
                        for (e in l)
                            i.event.remove(n, e + t[v], r, u, !0);
                        continue
                    }
                    for (h = i.event.special[e] || {}, e = (u ? h.delegateType : h.bindType) || e, o = l[e] || [], w = o.length, c = c ? new RegExp("(^|\\.)" + c.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null, y = 0; y < o.length; y++)
                        s = o[y], (f || b === s.origType) && (!r || r.guid === s.guid) && (!c || c.test(s.namespace)) && (!u || u === s.selector || u === "**" && s.selector) && (o.splice(y--, 1), s.selector && o.delegateCount--, h.remove && h.remove.call(n, s));
                    o.length === 0 && w !== o.length && ((!h.teardown || h.teardown.call(n, c, a.handle) === !1) && i.removeEvent(n, e, a.handle), delete l[e])
                }
                i.isEmptyObject(l) && (delete a.handle, i.removeData(n, "events", !0))
            }
        },customEvent: {getData: !0,setData: !0,changeData: !0},trigger: function(u, f, e, o) {
            if (!e || e.nodeType !== 3 && e.nodeType !== 8) {
                var w, d, c, h, l, v, a, y, p, k, s = u.type || u, b = [];
                if (ci.test(s + i.event.triggered))
                    return;
                if (s.indexOf("!") >= 0 && (s = s.slice(0, -1), d = !0), s.indexOf(".") >= 0 && (b = s.split("."), s = b.shift(), b.sort()), (!e || i.event.customEvent[s]) && !i.event.global[s])
                    return;
                if (u = typeof u == "object" ? u[i.expando] ? u : new i.Event(s, u) : new i.Event(s), u.type = s, u.isTrigger = !0, u.exclusive = d, u.namespace = b.join("."), u.namespace_re = u.namespace ? new RegExp("(^|\\.)" + b.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, v = s.indexOf(":") < 0 ? "on" + s : "", !e) {
                    w = i.cache;
                    for (c in w)
                        w[c].events && w[c].events[s] && i.event.trigger(u, f, w[c].handle.elem, !0);
                    return
                }
                if (u.result = t, u.target || (u.target = e), f = f != null ? i.makeArray(f) : [], f.unshift(u), a = i.event.special[s] || {}, a.trigger && a.trigger.apply(e, f) === !1)
                    return;
                if (p = [[e, a.bindType || s]], !o && !a.noBubble && !i.isWindow(e)) {
                    for (k = a.delegateType || s, h = ci.test(k + s) ? e : e.parentNode, l = e; h; h = h.parentNode)
                        p.push([h, k]), l = h;
                    l === (e.ownerDocument || r) && p.push([l.defaultView || l.parentWindow || n, k])
                }
                for (c = 0; c < p.length && !u.isPropagationStopped(); c++)
                    h = p[c][0], u.type = p[c][1], y = (i._data(h, "events") || {})[u.type] && i._data(h, "handle"), y && y.apply(h, f), y = v && h[v], y && i.acceptData(h) && y.apply(h, f) === !1 && u.preventDefault();
                return u.type = s, !o && !u.isDefaultPrevented() && (!a._default || a._default.apply(e.ownerDocument, f) === !1) && (s !== "click" || !i.nodeName(e, "a")) && i.acceptData(e) && v && e[s] && (s !== "focus" && s !== "blur" || u.target.offsetWidth !== 0) && !i.isWindow(e) && (l = e[v], l && (e[v] = null), i.event.triggered = s, e[s](), i.event.triggered = t, l && (e[v] = l)), u.result
            }
            return
        },dispatch: function(r) {
            r = i.event.fix(r || n.event);
            var f, p, e, y, v, a, s, l, u, o, g, c = (i._data(this, "events") || {})[r.type] || [], h = c.delegateCount, k = [].slice.call(arguments), d = !r.exclusive && !r.namespace, w = i.event.special[r.type] || {}, b = [];
            if (k[0] = r, r.delegateTarget = this, !w.preDispatch || w.preDispatch.call(this, r) !== !1) {
                if (h && (!r.button || r.type !== "click"))
                    for (y = i(this), y.context = this, e = r.target; e != this; e = e.parentNode || this)
                        if (e.disabled !== !0 || r.type !== "click") {
                            for (a = {}, l = [], y[0] = e, f = 0; f < h; f++)
                                u = c[f], o = u.selector, a[o] === t && (a[o] = y.is(o)), a[o] && l.push(u);
                            l.length && b.push({elem: e,matches: l})
                        }
                for (c.length > h && b.push({elem: this,matches: c.slice(h)}), f = 0; f < b.length && !r.isPropagationStopped(); f++)
                    for (s = b[f], r.currentTarget = s.elem, p = 0; p < s.matches.length && !r.isImmediatePropagationStopped(); p++)
                        u = s.matches[p], (d || !r.namespace && !u.namespace || r.namespace_re && r.namespace_re.test(u.namespace)) && (r.data = u.data, r.handleObj = u, v = ((i.event.special[u.origType] || {}).handle || u.handler).apply(s.elem, k), v !== t && (r.result = v, v === !1 && (r.preventDefault(), r.stopPropagation())));
                return w.postDispatch && w.postDispatch.call(this, r), r.result
            }
        },props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks: {},keyHooks: {props: "char charCode key keyCode".split(" "),filter: function(n, t) {
                return n.which == null && (n.which = t.charCode != null ? t.charCode : t.keyCode), n
            }},mouseHooks: {props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter: function(n, i) {
                var o, u, f, e = i.button, s = i.fromElement;
                return n.pageX == null && i.clientX != null && (o = n.target.ownerDocument || r, u = o.documentElement, f = o.body, n.pageX = i.clientX + (u && u.scrollLeft || f && f.scrollLeft || 0) - (u && u.clientLeft || f && f.clientLeft || 0), n.pageY = i.clientY + (u && u.scrollTop || f && f.scrollTop || 0) - (u && u.clientTop || f && f.clientTop || 0)), !n.relatedTarget && s && (n.relatedTarget = s === n.target ? i.toElement : s), !n.which && e !== t && (n.which = e & 1 ? 1 : e & 2 ? 3 : e & 4 ? 2 : 0), n
            }},fix: function(n) {
            if (n[i.expando])
                return n;
            var f, e, t = n, u = i.event.fixHooks[n.type] || {}, o = u.props ? this.props.concat(u.props) : this.props;
            for (n = i.Event(t), f = o.length; f; )
                e = o[--f], n[e] = t[e];
            return n.target || (n.target = t.srcElement || r), n.target.nodeType === 3 && (n.target = n.target.parentNode), n.metaKey = !!n.metaKey, u.filter ? u.filter(n, t) : n
        },special: {ready: {setup: i.bindReady},load: {noBubble: !0},focus: {delegateType: "focusin"},blur: {delegateType: "focusout"},beforeunload: {setup: function(n, t, r) {
                    i.isWindow(this) && (this.onbeforeunload = r)
                },teardown: function(n, t) {
                    this.onbeforeunload === t && (this.onbeforeunload = null)
                }}},simulate: function(n, t, r, u) {
            var f = i.extend(new i.Event, r, {type: n,isSimulated: !0,originalEvent: {}});
            u ? i.event.trigger(f, null, t) : i.event.dispatch.call(t, f), f.isDefaultPrevented() && r.preventDefault()
        }}, i.event.handle = i.event.dispatch, i.removeEvent = r.removeEventListener ? function(n, t, i) {
        n.removeEventListener && n.removeEventListener(t, i, !1)
    } : function(n, t, i) {
        var r = "on" + t;
        n.detachEvent && (typeof n[r] == "undefined" && (n[r] = null), n.detachEvent(r, i))
    }, i.Event = function(n, t) {
        if (this instanceof i.Event)
            n && n.type ? (this.originalEvent = n, this.type = n.type, this.isDefaultPrevented = n.defaultPrevented || n.returnValue === !1 || n.getPreventDefault && n.getPreventDefault() ? et : p) : this.type = n, t && i.extend(this, t), this.timeStamp = n && n.timeStamp || i.now(), this[i.expando] = !0;
        else
            return new i.Event(n, t)
    }, i.Event.prototype = {preventDefault: function() {
            this.isDefaultPrevented = et;
            var n = this.originalEvent;
            n && (n.preventDefault ? n.preventDefault() : n.returnValue = !1)
        },stopPropagation: function() {
            this.isPropagationStopped = et;
            var n = this.originalEvent;
            n && (n.stopPropagation && n.stopPropagation(), n.cancelBubble = !0)
        },stopImmediatePropagation: function() {
            this.isImmediatePropagationStopped = et, this.stopPropagation()
        },isDefaultPrevented: p,isPropagationStopped: p,isImmediatePropagationStopped: p}, i.each({mouseenter: "mouseover",mouseleave: "mouseout"}, function(n, t) {
        i.event.special[n] = {delegateType: t,bindType: t,handle: function(n) {
                var f, e = this, r = n.relatedTarget, u = n.handleObj, o = u.selector;
                return r && (r === e || i.contains(e, r)) || (n.type = u.origType, f = u.handler.apply(this, arguments), n.type = t), f
            }}
    }), i.support.submitBubbles || (i.event.special.submit = {setup: function() {
            if (i.nodeName(this, "form"))
                return !1;
            i.event.add(this, "click._submit keypress._submit", function(n) {
                var u = n.target, r = i.nodeName(u, "input") || i.nodeName(u, "button") ? u.form : t;
                r && !i._data(r, "_submit_attached") && (i.event.add(r, "submit._submit", function(n) {
                    n._submit_bubble = !0
                }), i._data(r, "_submit_attached", !0))
            })
        },postDispatch: function(n) {
            n._submit_bubble && (delete n._submit_bubble, this.parentNode && !n.isTrigger && i.event.simulate("submit", this.parentNode, n, !0))
        },teardown: function() {
            if (i.nodeName(this, "form"))
                return !1;
            i.event.remove(this, "._submit")
        }}), i.support.changeBubbles || (i.event.special.change = {setup: function() {
            if (yt.test(this.nodeName))
                return (this.type === "checkbox" || this.type === "radio") && (i.event.add(this, "propertychange._change", function(n) {
                    n.originalEvent.propertyName === "checked" && (this._just_changed = !0)
                }), i.event.add(this, "click._change", function(n) {
                    this._just_changed && !n.isTrigger && (this._just_changed = !1), i.event.simulate("change", this, n, !0)
                })), !1;
            i.event.add(this, "beforeactivate._change", function(n) {
                var t = n.target;
                yt.test(t.nodeName) && !i._data(t, "_change_attached") && (i.event.add(t, "change._change", function(n) {
                    this.parentNode && !n.isSimulated && !n.isTrigger && i.event.simulate("change", this.parentNode, n, !0)
                }), i._data(t, "_change_attached", !0))
            })
        },handle: function(n) {
            var t = n.target;
            if (this !== t || n.isSimulated || n.isTrigger || t.type !== "radio" && t.type !== "checkbox")
                return n.handleObj.handler.apply(this, arguments)
        },teardown: function() {
            return i.event.remove(this, "._change"), yt.test(this.nodeName)
        }}), i.support.focusinBubbles || i.each({focus: "focusin",blur: "focusout"}, function(n, t) {
        var u = 0, f = function(n) {
            i.event.simulate(t, n.target, i.event.fix(n), !0)
        };
        i.event.special[t] = {setup: function() {
                u++ == 0 && r.addEventListener(n, f, !0)
            },teardown: function() {
                --u == 0 && r.removeEventListener(n, f, !0)
            }}
    }), i.fn.extend({on: function(n, r, u, f, e) {
            var o, s;
            if (typeof n == "object") {
                typeof r != "string" && (u = u || r, r = t);
                for (s in n)
                    this.on(s, r, u, n[s], e);
                return this
            }
            if (u == null && f == null ? (f = r, u = r = t) : f == null && (typeof r == "string" ? (f = u, u = t) : (f = u, u = r, r = t)), f === !1)
                f = p;
            else if (!f)
                return this;
            return e === 1 && (o = f, f = function(n) {
                return i().off(n), o.apply(this, arguments)
            }, f.guid = o.guid || (o.guid = i.guid++)), this.each(function() {
                i.event.add(this, n, f, u, r)
            })
        },one: function(n, t, i, r) {
            return this.on(n, t, i, r, 1)
        },off: function(n, r, u) {
            var f, e;
            if (n && n.preventDefault && n.handleObj)
                return f = n.handleObj, i(n.delegateTarget).off(f.namespace ? f.origType + "." + f.namespace : f.origType, f.selector, f.handler), this;
            if (typeof n == "object") {
                for (e in n)
                    this.off(e, r, n[e]);
                return this
            }
            return (r === !1 || typeof r == "function") && (u = r, r = t), u === !1 && (u = p), this.each(function() {
                i.event.remove(this, n, u, r)
            })
        },bind: function(n, t, i) {
            return this.on(n, null, t, i)
        },unbind: function(n, t) {
            return this.off(n, null, t)
        },live: function(n, t, r) {
            return i(this.context).on(n, this.selector, t, r), this
        },die: function(n, t) {
            return i(this.context).off(n, this.selector || "**", t), this
        },delegate: function(n, t, i, r) {
            return this.on(t, n, i, r)
        },undelegate: function(n, t, i) {
            return arguments.length == 1 ? this.off(n, "**") : this.off(t, n || "**", i)
        },trigger: function(n, t) {
            return this.each(function() {
                i.event.trigger(n, t, this)
            })
        },triggerHandler: function(n, t) {
            if (this[0])
                return i.event.trigger(n, t, this[0], !0)
        },toggle: function(n) {
            var t = arguments, u = n.guid || i.guid++, r = 0, f = function(u) {
                var f = (i._data(this, "lastToggle" + n.guid) || 0) % r;
                return i._data(this, "lastToggle" + n.guid, f + 1), u.preventDefault(), t[f].apply(this, arguments) || !1
            };
            for (f.guid = u; r < t.length; )
                t[r++].guid = u;
            return this.click(f)
        },hover: function(n, t) {
            return this.mouseenter(n).mouseleave(t || n)
        }}), i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(n, t) {
        i.fn[t] = function(n, i) {
            return i == null && (i = n, n = null), arguments.length > 0 ? this.on(t, null, n, i) : this.trigger(t)
        }, tf.test(t) && (i.event.fixHooks[t] = i.event.keyHooks), wu.test(t) && (i.event.fixHooks[t] = i.event.mouseHooks)
    }), function(n, t) {
        function ti(n, t, i, u) {
            for (var f = 0, e = t.length; f < e; f++)
                r(n, t[f], i, u)
        }
        function hi(n, t, i, f, e, o) {
            var s, h = u.setFilters[t.toLowerCase()];
            return h || r.error(t), (n || !(s = e)) && ti(n || "*", f, s = [], e), s.length > 0 ? h(s, i, o) : []
        }
        function oi(n, i, u, e, o) {
            for (var c, g, v, a, h, w, s, b, d = 0, nt = o.length, y = l.POS, tt = new RegExp("^" + y.source + "(?!" + f + ")", "i"), it = function() {
                for (var n = 1, i = arguments.length - 2; n < i; n++)
                    arguments[n] === t && (c[n] = t)
            }; d < nt; d++) {
                for (y.exec(""), n = o[d], a = [], v = 0, h = e; c = y.exec(n); )
                    b = y.lastIndex = c.index + c[0].length, b > v && (s = n.slice(v, c.index), v = b, w = [i], k.test(s) && (h && (w = h), h = e), (g = di.test(s)) && (s = s.slice(0, -5).replace(k, "$&*")), c.length > 1 && c[0].replace(tt, it), h = hi(s, c[1], c[2], w, h, g));
                h ? (a = a.concat(h), (s = n.slice(v)) && s !== ")" ? k.test(s) ? ti(s, a, u, e) : r(s, i, u, e ? e.concat(h) : h) : p.apply(u, a)) : r(n, i, u, e)
            }
            return nt === 1 ? u : r.uniqueSort(u)
        }
        function li(n, t, i) {
            for (var c, e, h, a = [], v = 0, f = ii.exec(n), o = !f.pop() && !f.pop(), p = o && n.match(ct) || [""], y = u.preFilter, w = u.filter, b = !i && t !== s; (e = p[v]) != null && o; v++)
                for (a.push(c = []), b && (e = " " + e); e; ) {
                    o = !1, (f = k.exec(e)) && (e = e.slice(f[0].length), o = c.push({part: f.pop().replace(rt, " "),captures: f}));
                    for (h in w)
                        (f = l[h].exec(e)) && (!y[h] || (f = y[h](f, t, i))) && (e = e.slice(f.shift().length), o = c.push({part: h,captures: f}));
                    if (!o)
                        break
                }
            return o || r.error(n), a
        }
        function fi(n, t, i) {
            var r = t.dir, u = gt++;
            return n || (n = function(n) {
                return n === i
            }), t.first ? function(t, i) {
                while (t = t[r])
                    if (t.nodeType === 1)
                        return n(t, i) && t
            } : function(t, i) {
                for (var f, e = u + "." + kt, s = e + "." + bt; t = t[r]; )
                    if (t.nodeType === 1) {
                        if ((f = t[o]) === s)
                            return t.sizset;
                        if (typeof f == "string" && f.indexOf(e) === 0) {
                            if (t.sizset)
                                return t
                        } else {
                            if (t[o] = s, n(t, i))
                                return t.sizset = !0, t;
                            t.sizset = !1
                        }
                    }
            }
        }
        function yi(n, t) {
            return n ? function(i, r) {
                var u = t(i, r);
                return u && n(u === !0 ? i : u, r)
            } : t
        }
        function pi(n, t, i) {
            for (var r, f, e = 0; r = n[e]; e++)
                u.relative[r.part] ? f = fi(f, u.relative[r.part], t) : (r.captures.push(t, i), f = yi(f, u.filter[r.part].apply(null, r.captures)));
            return f
        }
        function vi(n) {
            return function(t, i) {
                for (var r, u = 0; r = n[u]; u++)
                    if (r(t, i))
                        return !0;
                return !1
            }
        }
        var bt, kt, g, b, vt, s = n.document, e = s.documentElement, h = "undefined", tt = !1, dt = !0, gt = 0, c = [].slice, p = [].push, o = ("sizcache" + Math.random()).replace(".", ""), f = "[\\x20\\t\\r\\n\\f]", v = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", wi = v.replace("w", "w#"), gi = "([*^$|!~]?=)", ri = "\\[" + f + "*(" + v + ")" + f + "*(?:" + gi + f + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + wi + ")|)|)" + f + "*\\]", ui = ":(" + v + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)", yt = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)", wt = f + "*([\\x20\\t\\r\\n\\f>+~])" + f + "*", at = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + ri + "|" + ui.replace(2, 7) + "|[^\\\\(),])+", rt = new RegExp("^" + f + "+|((?:^|[^\\\\])(?:\\\\.)*)" + f + "+$", "g"), k = new RegExp("^" + wt), ct = new RegExp(at + "?(?=" + f + "*,|$)", "g"), ii = new RegExp("^(?:(?!,)(?:(?:^|,)" + f + "*" + at + ")*?|" + f + "*(.*?))(\\)|$)"), tr = new RegExp(at.slice(19, -6) + "\\x20\\t\\r\\n\\f>+~])+|" + wt, "g"), nr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, ht = /[\x20\t\r\n\f]*[+~]/, di = /:not\($/, ki = /h\d/i, bi = /input|select|textarea|button/i, y = /\\(?!\\)/g, l = {ID: new RegExp("^#(" + v + ")"),CLASS: new RegExp("^\\.(" + v + ")"),NAME: new RegExp("^\\[name=['\"]?(" + v + ")['\"]?\\]"),TAG: new RegExp("^(" + v.replace("[-", "[-\\*") + ")"),ATTR: new RegExp("^" + ri),PSEUDO: new RegExp("^" + ui),CHILD: new RegExp("^:(only|nth|last|first)-child(?:\\(" + f + "*(even|odd|(([+-]|)(\\d*)n|)" + f + "*(?:([+-]|)" + f + "*(\\d+)|))" + f + "*\\)|)", "i"),POS: new RegExp(yt, "ig"),needsContext: new RegExp("^" + f + "*[>+~]|" + yt, "i")}, lt = {}, ut = [], ot = {}, st = [], nt = function(n) {
            return n.sizzleFilter = !0, n
        }, w = function(n) {
            return function(t) {
                return t.nodeName.toLowerCase() === "input" && t.type === n
            }
        }, pt = function(n) {
            return function(t) {
                var i = t.nodeName.toLowerCase();
                return (i === "input" || i === "button") && t.type === n
            }
        }, a = function(n) {
            var t = !1, i = s.createElement("div");
            try {
                t = n(i)
            } catch (r) {
            }
            return i = null, t
        }, ir = a(function(n) {
            n.innerHTML = "<select></select>";
            var t = typeof n.lastChild.getAttribute("multiple");
            return t !== "boolean" && t !== "string"
        }), ai = a(function(n) {
            n.id = o + 0, n.innerHTML = "<a name='" + o + "'></a><div name='" + o + "'></div>", e.insertBefore(n, e.firstChild);
            var t = s.getElementsByName && s.getElementsByName(o).length === 2 + s.getElementsByName(o + 0).length;
            return vt = !s.getElementById(o), e.removeChild(n), t
        }), ei = a(function(n) {
            return n.appendChild(s.createComment("")), n.getElementsByTagName("*").length === 0
        }), ci = a(function(n) {
            return n.innerHTML = "<a href='#'></a>", n.firstChild && typeof n.firstChild.getAttribute !== h && n.firstChild.getAttribute("href") === "#"
        }), ni = a(function(n) {
            return n.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>", !n.getElementsByClassName || n.getElementsByClassName("e").length === 0 ? !1 : (n.lastChild.className = "e", n.getElementsByClassName("e").length !== 1)
        }), r = function(n, t, i, r) {
            i = i || [], t = t || s;
            var e, u, o, f, h = t.nodeType;
            if (h !== 1 && h !== 9)
                return [];
            if (!n || typeof n != "string")
                return i;
            if (o = it(t), !o && !r && (e = nr.exec(n)))
                if (f = e[1]) {
                    if (h === 9) {
                        if (u = t.getElementById(f), !u || !u.parentNode)
                            return i;
                        if (u.id === f)
                            return i.push(u), i
                    } else if (t.ownerDocument && (u = t.ownerDocument.getElementById(f)) && si(t, u) && u.id === f)
                        return i.push(u), i
                } else {
                    if (e[2])
                        return p.apply(i, c.call(t.getElementsByTagName(n), 0)), i;
                    if ((f = e[3]) && ni && t.getElementsByClassName)
                        return p.apply(i, c.call(t.getElementsByClassName(f), 0)), i
                }
            return d(n, t, i, r, o)
        }, u = r.selectors = {cacheLength: 50,match: l,order: ["ID", "TAG"],attrHandle: {},createPseudo: nt,find: {ID: vt ? function(n, t, i) {
                    if (typeof t.getElementById !== h && !i) {
                        var r = t.getElementById(n);
                        return r && r.parentNode ? [r] : []
                    }
                } : function(n, i, r) {
                    if (typeof i.getElementById !== h && !r) {
                        var u = i.getElementById(n);
                        return u ? u.id === n || typeof u.getAttributeNode !== h && u.getAttributeNode("id").value === n ? [u] : t : []
                    }
                },TAG: ei ? function(n, t) {
                    if (typeof t.getElementsByTagName !== h)
                        return t.getElementsByTagName(n)
                } : function(n, t) {
                    var f = t.getElementsByTagName(n), i, r, u;
                    if (n === "*") {
                        for (r = [], u = 0; i = f[u]; u++)
                            i.nodeType === 1 && r.push(i);
                        return r
                    }
                    return f
                }},relative: {">": {dir: "parentNode",first: !0}," ": {dir: "parentNode"},"+": {dir: "previousSibling",first: !0},"~": {dir: "previousSibling"}},preFilter: {ATTR: function(n) {
                    return n[1] = n[1].replace(y, ""), n[3] = (n[4] || n[5] || "").replace(y, ""), n[2] === "~=" && (n[3] = " " + n[3] + " "), n.slice(0, 4)
                },CHILD: function(n) {
                    return n[1] = n[1].toLowerCase(), n[1] === "nth" ? (n[2] || r.error(n[0]), n[3] = +(n[3] ? n[4] + (n[5] || 1) : 2 * (n[2] === "even" || n[2] === "odd")), n[4] = +(n[6] + n[7] || n[2] === "odd")) : n[2] && r.error(n[0]), n
                },PSEUDO: function(n) {
                    var i, t = n[4];
                    return l.CHILD.test(n[0]) ? null : (t && (i = ii.exec(t)) && i.pop() && (n[0] = n[0].slice(0, i[0].length - t.length - 1), t = i[0].slice(0, -1)), n.splice(2, 3, t || n[3]), n)
                }},filter: {ID: vt ? function(n) {
                    return n = n.replace(y, ""), function(t) {
                        return t.getAttribute("id") === n
                    }
                } : function(n) {
                    return n = n.replace(y, ""), function(t) {
                        var i = typeof t.getAttributeNode !== h && t.getAttributeNode("id");
                        return i && i.value === n
                    }
                },TAG: function(n) {
                    return n === "*" ? function() {
                        return !0
                    } : (n = n.replace(y, "").toLowerCase(), function(t) {
                        return t.nodeName && t.nodeName.toLowerCase() === n
                    })
                },CLASS: function(n) {
                    var t = lt[n];
                    return t || (t = lt[n] = new RegExp("(^|" + f + ")" + n + "(" + f + "|$)"), ut.push(n), ut.length > u.cacheLength && delete lt[ut.shift()]), function(n) {
                        return t.test(n.className || typeof n.getAttribute !== h && n.getAttribute("class") || "")
                    }
                },ATTR: function(n, t, i) {
                    return t ? function(u) {
                        var e = r.attr(u, n), f = e + "";
                        if (e == null)
                            return t === "!=";
                        switch (t) {
                            case "=":
                                return f === i;
                            case "!=":
                                return f !== i;
                            case "^=":
                                return i && f.indexOf(i) === 0;
                            case "*=":
                                return i && f.indexOf(i) > -1;
                            case "$=":
                                return i && f.substr(f.length - i.length) === i;
                            case "~=":
                                return (" " + f + " ").indexOf(i) > -1;
                            case "|=":
                                return f === i || f.substr(0, i.length + 1) === i + "-"
                        }
                    } : function(t) {
                        return r.attr(t, n) != null
                    }
                },CHILD: function(n, t, i, r) {
                    if (n === "nth") {
                        var u = gt++;
                        return function(n) {
                            var f, e, s = 0, t = n;
                            if (i === 1 && r === 0)
                                return !0;
                            if (f = n.parentNode, f && (f[o] !== u || !n.sizset)) {
                                for (t = f.firstChild; t; t = t.nextSibling)
                                    if (t.nodeType === 1 && (t.sizset = ++s, t === n))
                                        break;
                                f[o] = u
                            }
                            return e = n.sizset - r, i === 0 ? e === 0 : e % i == 0 && e / i >= 0
                        }
                    }
                    return function(t) {
                        var i = t;
                        switch (n) {
                            case "only":
                            case "first":
                                while (i = i.previousSibling)
                                    if (i.nodeType === 1)
                                        return !1;
                                if (n === "first")
                                    return !0;
                                i = t;
                            case "last":
                                while (i = i.nextSibling)
                                    if (i.nodeType === 1)
                                        return !1;
                                return !0
                        }
                    }
                },PSEUDO: function(n, t, i, f) {
                    var e = u.pseudos[n] || u.pseudos[n.toLowerCase()];
                    return e || r.error("unsupported pseudo: " + n), e.sizzleFilter ? e(t, i, f) : e
                }},pseudos: {not: nt(function(n, t, i) {
                    var r = et(n.replace(rt, "$1"), t, i);
                    return function(n) {
                        return !r(n)
                    }
                }),enabled: function(n) {
                    return n.disabled === !1
                },disabled: function(n) {
                    return n.disabled === !0
                },checked: function(n) {
                    var t = n.nodeName.toLowerCase();
                    return t === "input" && !!n.checked || t === "option" && !!n.selected
                },selected: function(n) {
                    return n.parentNode && n.parentNode.selectedIndex, n.selected === !0
                },parent: function(n) {
                    return !u.pseudos.empty(n)
                },empty: function(n) {
                    var t;
                    for (n = n.firstChild; n; ) {
                        if (n.nodeName > "@" || (t = n.nodeType) === 3 || t === 4)
                            return !1;
                        n = n.nextSibling
                    }
                    return !0
                },contains: nt(function(n) {
                    return function(t) {
                        return (t.textContent || t.innerText || ft(t)).indexOf(n) > -1
                    }
                }),has: nt(function(n) {
                    return function(t) {
                        return r(n, t).length > 0
                    }
                }),header: function(n) {
                    return ki.test(n.nodeName)
                },text: function(n) {
                    var t, i;
                    return n.nodeName.toLowerCase() === "input" && (t = n.type) === "text" && ((i = n.getAttribute("type")) == null || i.toLowerCase() === t)
                },radio: w("radio"),checkbox: w("checkbox"),file: w("file"),password: w("password"),image: w("image"),submit: pt("submit"),reset: pt("reset"),button: function(n) {
                    var t = n.nodeName.toLowerCase();
                    return t === "input" && n.type === "button" || t === "button"
                },input: function(n) {
                    return bi.test(n.nodeName)
                },focus: function(n) {
                    var t = n.ownerDocument;
                    return n === t.activeElement && (!t.hasFocus || t.hasFocus()) && (!!n.type || !!n.href)
                },active: function(n) {
                    return n === n.ownerDocument.activeElement
                }},setFilters: {first: function(n, t, i) {
                    return i ? n.slice(1) : [n[0]]
                },last: function(n, t, i) {
                    var r = n.pop();
                    return i ? n : [r]
                },even: function(n, t, i) {
                    for (var u = [], r = i ? 1 : 0, f = n.length; r < f; r = r + 2)
                        u.push(n[r]);
                    return u
                },odd: function(n, t, i) {
                    for (var u = [], r = i ? 0 : 1, f = n.length; r < f; r = r + 2)
                        u.push(n[r]);
                    return u
                },lt: function(n, t, i) {
                    return i ? n.slice(+t) : n.slice(0, +t)
                },gt: function(n, t, i) {
                    return i ? n.slice(0, +t + 1) : n.slice(+t + 1)
                },eq: function(n, t, i) {
                    var r = n.splice(+t, 1);
                    return i ? n : r
                }}}, et, d;
        u.setFilters.nth = u.setFilters.eq, u.filters = u.pseudos, ci || (u.attrHandle = {href: function(n) {
                return n.getAttribute("href", 2)
            },type: function(n) {
                return n.getAttribute("type")
            }}), ai && (u.order.push("NAME"), u.find.NAME = function(n, t) {
            if (typeof t.getElementsByName !== h)
                return t.getElementsByName(n)
        }), ni && (u.order.splice(1, 0, "CLASS"), u.find.CLASS = function(n, t, i) {
            if (typeof t.getElementsByClassName !== h && !i)
                return t.getElementsByClassName(n)
        });
        try {
            c.call(e.childNodes, 0)[0].nodeType
        } catch (rr) {
            c = function(n) {
                for (var t, i = []; t = this[n]; n++)
                    i.push(t);
                return i
            }
        }
        var it = r.isXML = function(n) {
            var t = n && (n.ownerDocument || n).documentElement;
            return t ? t.nodeName !== "HTML" : !1
        }, si = r.contains = e.compareDocumentPosition ? function(n, t) {
            return !!(n.compareDocumentPosition(t) & 16)
        } : e.contains ? function(n, t) {
            var r = n.nodeType === 9 ? n.documentElement : n, i = t.parentNode;
            return n === i || !!(i && i.nodeType === 1 && r.contains && r.contains(i))
        } : function(n, t) {
            while (t = t.parentNode)
                if (t === n)
                    return !0;
            return !1
        }, ft = r.getText = function(n) {
            var r, i = "", u = 0, t = n.nodeType;
            if (t) {
                if (t === 1 || t === 9 || t === 11) {
                    if (typeof n.textContent == "string")
                        return n.textContent;
                    for (n = n.firstChild; n; n = n.nextSibling)
                        i += ft(n)
                } else if (t === 3 || t === 4)
                    return n.nodeValue
            } else
                for (; r = n[u]; u++)
                    i += ft(r);
            return i
        };
        r.attr = function(n, t) {
            var i, r = it(n);
            return r || (t = t.toLowerCase()), u.attrHandle[t] ? u.attrHandle[t](n) : ir || r ? n.getAttribute(t) : (i = n.getAttributeNode(t), i ? typeof n[t] == "boolean" ? n[t] ? t : null : i.specified ? i.value : null : null)
        }, r.error = function(n) {
            throw new Error("Syntax error, unrecognized expression: " + n);
        }, [0, 0].sort(function() {
            return dt = 0
        }), e.compareDocumentPosition ? g = function(n, t) {
            return n === t ? (tt = !0, 0) : (!n.compareDocumentPosition || !t.compareDocumentPosition ? n.compareDocumentPosition : n.compareDocumentPosition(t) & 4) ? -1 : 1
        } : (g = function(n, t) {
            var i;
            if (n === t)
                return tt = !0, 0;
            if (n.sourceIndex && t.sourceIndex)
                return n.sourceIndex - t.sourceIndex;
            var e, h, u = [], f = [], o = n.parentNode, s = t.parentNode, r = o;
            if (o === s)
                return b(n, t);
            if (!o)
                return -1;
            if (!s)
                return 1;
            while (r)
                u.unshift(r), r = r.parentNode;
            for (r = s; r; )
                f.unshift(r), r = r.parentNode;
            for (e = u.length, h = f.length, i = 0; i < e && i < h; i++)
                if (u[i] !== f[i])
                    return b(u[i], f[i]);
            return i === e ? b(n, f[i], -1) : b(u[i], t, 1)
        }, b = function(n, t, i) {
            if (n === t)
                return i;
            for (var r = n.nextSibling; r; ) {
                if (r === t)
                    return -1;
                r = r.nextSibling
            }
            return 1
        }), r.uniqueSort = function(n) {
            var i, t = 1;
            if (g && (tt = dt, n.sort(g), tt))
                for (; i = n[t]; t++)
                    i === n[t - 1] && n.splice(t--, 1);
            return n
        }, et = r.compile = function(n, t, i) {
            var o, f, e, r = ot[n];
            if (r && r.context === t)
                return r;
            for (f = li(n, t, i), e = 0; o = f[e]; e++)
                f[e] = pi(o, t, i);
            return r = ot[n] = vi(f), r.context = t, r.runs = r.dirruns = 0, st.push(n), st.length > u.cacheLength && delete ot[st.shift()], r
        }, r.matches = function(n, t) {
            return r(n, null, null, t)
        }, r.matchesSelector = function(n, t) {
            return r(t, null, null, [n]).length > 0
        }, d = function(n, t, i, r, f) {
            n = n.replace(rt, "$1");
            var o, a, s, d, k, v, w, g, b, e = n.match(ct), h = n.match(tr), nt = t.nodeType;
            if (l.POS.test(n))
                return oi(n, t, i, r, e);
            if (r)
                o = c.call(r, 0);
            else if (e && e.length === 1) {
                if (h.length > 1 && nt === 9 && !f && (e = l.ID.exec(h[0]))) {
                    if (t = u.find.ID(e[1], t, f)[0], !t)
                        return i;
                    n = n.slice(h.shift().length)
                }
                for (g = (e = ht.exec(h[0])) && !e.index && t.parentNode || t, b = h.pop(), v = b.split(":not")[0], s = 0, d = u.order.length; s < d; s++)
                    if (w = u.order[s], e = l[w].exec(v)) {
                        if (o = u.find[w]((e[1] || "").replace(y, ""), g, f), o == null)
                            continue;
                        v === b && (n = n.slice(0, n.length - b.length) + v.replace(l[w], ""), n || p.apply(i, c.call(o, 0)));
                        break
                    }
            }
            if (n)
                for (a = et(n, t, f), kt = a.dirruns++, o == null && (o = u.find.TAG("*", ht.test(n) && t.parentNode || t)), s = 0; k = o[s]; s++)
                    bt = a.runs++, a(k, t) && i.push(k);
            return i
        }, s.querySelectorAll && function() {
            var s, h = d, l = /'|\\/g, v = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, n = [], t = [":active"], i = e.matchesSelector || e.mozMatchesSelector || e.webkitMatchesSelector || e.oMatchesSelector || e.msMatchesSelector;
            a(function(t) {
                t.innerHTML = "<select><option selected></option></select>", t.querySelectorAll("[selected]").length || n.push("\\[" + f + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)"), t.querySelectorAll(":checked").length || n.push(":checked")
            }), a(function(t) {
                t.innerHTML = "<p test=''></p>", t.querySelectorAll("[test^='']").length && n.push("[*^$]=" + f + "*(?:\"\"|'')"), t.innerHTML = "<input type='hidden'>", t.querySelectorAll(":enabled").length || n.push(":enabled", ":disabled")
            }), n = n.length && new RegExp(n.join("|")), d = function(t, i, r, u, f) {
                if (!u && !f && (!n || !n.test(t)))
                    if (i.nodeType === 9)
                        try {
                            return p.apply(r, c.call(i.querySelectorAll(t), 0)), r
                        } catch (v) {
                        }
                    else if (i.nodeType === 1 && i.nodeName.toLowerCase() !== "object") {
                        var s = i.getAttribute("id"), e = s || o, a = ht.test(t) && i.parentNode || i;
                        s ? e = e.replace(l, "\\$&") : i.setAttribute("id", e);
                        try {
                            return p.apply(r, c.call(a.querySelectorAll(t.replace(ct, "[id='" + e + "'] $&")), 0)), r
                        } catch (v) {
                        }finally {
                            s || i.removeAttribute("id")
                        }
                    }
                return h(t, i, r, u, f)
            }, i && (a(function(n) {
                s = i.call(n, "div");
                try {
                    i.call(n, "[test!='']:sizzle"), t.push(u.match.PSEUDO)
                } catch (r) {
                }
            }), t = new RegExp(t.join("|")), r.matchesSelector = function(u, f) {
                if (f = f.replace(v, "='$1']"), !it(u) && !t.test(f) && (!n || !n.test(f)))
                    try {
                        var e = i.call(u, f);
                        if (e || s || u.document && u.document.nodeType !== 11)
                            return e
                    } catch (o) {
                    }
                return r(f, null, null, [u]).length > 0
            })
        }(), r.attr = i.attr, i.find = r, i.expr = r.selectors, i.expr[":"] = i.expr.pseudos, i.unique = r.uniqueSort, i.text = r.getText, i.isXMLDoc = r.isXML, i.contains = r.contains
    }(n);
    var so = /Until$/, uo = /^(?:parents|prev(?:Until|All))/, ge = /^.[^:#\[\.,]*$/, ai = i.expr.match.needsContext, ae = {children: !0,contents: !0,next: !0,prev: !0};
    i.fn.extend({find: function(n) {
            var t, f, o, u, e, r, s = this;
            if (typeof n != "string")
                return i(n).filter(function() {
                    for (t = 0, f = s.length; t < f; t++)
                        if (i.contains(s[t], this))
                            return !0
                });
            for (r = this.pushStack("", "find", n), t = 0, f = this.length; t < f; t++)
                if (o = r.length, i.find(n, this[t], r), t > 0)
                    for (u = o; u < r.length; u++)
                        for (e = 0; e < o; e++)
                            if (r[e] === r[u]) {
                                r.splice(u--, 1);
                                break
                            }
            return r
        },has: function(n) {
            var t, r = i(n, this), u = r.length;
            return this.filter(function() {
                for (t = 0; t < u; t++)
                    if (i.contains(this, r[t]))
                        return !0
            })
        },not: function(n) {
            return this.pushStack(eu(this, n, !1), "not", n)
        },filter: function(n) {
            return this.pushStack(eu(this, n, !0), "filter", n)
        },is: function(n) {
            return !!n && (typeof n == "string" ? ai.test(n) ? i(n, this.context).index(this[0]) >= 0 : i.filter(n, this).length > 0 : this.filter(n).length > 0)
        },closest: function(n, t) {
            for (var r, f = 0, o = this.length, u = [], e = ai.test(n) || typeof n != "string" ? i(n, t || this.context) : 0; f < o; f++)
                for (r = this[f]; r && r.ownerDocument && r !== t && r.nodeType !== 11; ) {
                    if (e ? e.index(r) > -1 : i.find.matchesSelector(r, n)) {
                        u.push(r);
                        break
                    }
                    r = r.parentNode
                }
            return u = u.length > 1 ? i.unique(u) : u, this.pushStack(u, "closest", n)
        },index: function(n) {
            return n ? typeof n == "string" ? i.inArray(this[0], i(n)) : i.inArray(n.jquery ? n[0] : n, this) : this[0] && this[0].parentNode ? this.prevAll().length : -1
        },add: function(n, t) {
            var u = typeof n == "string" ? i(n, t) : i.makeArray(n && n.nodeType ? [n] : n), r = i.merge(this.get(), u);
            return this.pushStack(k(u[0]) || k(r[0]) ? r : i.unique(r))
        },addBack: function(n) {
            return this.add(n == null ? this.prevObject : this.prevObject.filter(n))
        }}), i.fn.andSelf = i.fn.addBack, i.each({parent: function(n) {
            var t = n.parentNode;
            return t && t.nodeType !== 11 ? t : null
        },parents: function(n) {
            return i.dir(n, "parentNode")
        },parentsUntil: function(n, t, r) {
            return i.dir(n, "parentNode", r)
        },next: function(n) {
            return ou(n, "nextSibling")
        },prev: function(n) {
            return ou(n, "previousSibling")
        },nextAll: function(n) {
            return i.dir(n, "nextSibling")
        },prevAll: function(n) {
            return i.dir(n, "previousSibling")
        },nextUntil: function(n, t, r) {
            return i.dir(n, "nextSibling", r)
        },prevUntil: function(n, t, r) {
            return i.dir(n, "previousSibling", r)
        },siblings: function(n) {
            return i.sibling((n.parentNode || {}).firstChild, n)
        },children: function(n) {
            return i.sibling(n.firstChild)
        },contents: function(n) {
            return i.nodeName(n, "iframe") ? n.contentDocument || n.contentWindow.document : i.merge([], n.childNodes)
        }}, function(n, t) {
        i.fn[n] = function(r, u) {
            var f = i.map(this, t, r);
            return so.test(n) || (u = r), u && typeof u == "string" && (f = i.filter(u, f)), f = this.length > 1 && !ae[n] ? i.unique(f) : f, this.length > 1 && uo.test(n) && (f = f.reverse()), this.pushStack(f, n, o.call(arguments).join(","))
        }
    }), i.extend({filter: function(n, t, r) {
            return r && (n = ":not(" + n + ")"), t.length === 1 ? i.find.matchesSelector(t[0], n) ? [t[0]] : [] : i.find.matches(n, t)
        },dir: function(n, r, u) {
            for (var e = [], f = n[r]; f && f.nodeType !== 9 && (u === t || f.nodeType !== 1 || !i(f).is(u)); )
                f.nodeType === 1 && e.push(f), f = f[r];
            return e
        },sibling: function(n, t) {
            for (var i = []; n; n = n.nextSibling)
                n.nodeType === 1 && n !== t && i.push(n);
            return i
        }});
    var vi = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", re = / jQuery\d+="(?:null|\d+)"/g, pt = /^\s+/, bi = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, di = /<([\w:]+)/, oe = /<tbody/i, se = /<|&#?\w+;/, he = /<(?:script|style|link)/i, ce = /<(?:script|object|embed|option|style)/i, at = new RegExp("<(?:" + vi + ")[\\s/>]", "i"), tr = /^(?:checkbox|radio)$/, ir = /checked\s*(?:[^=]|=\s*.checked.)/i, ye = /\/(java|ecma)script/i, pe = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g, e = {option: [1, "<select multiple='multiple'>", "</select>"],legend: [1, "<fieldset>", "</fieldset>"],thead: [1, "<table>", "</table>"],tr: [2, "<table><tbody>", "</tbody></table>"],td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],area: [1, "<map>", "</map>"],_default: [0, "", ""]}, ur = fu(r), kt = ur.appendChild(r.createElement("div"));
    e.optgroup = e.option, e.tbody = e.tfoot = e.colgroup = e.caption = e.thead, e.th = e.td, i.support.htmlSerialize || (e._default = [1, "X<div>", "</div>"]), i.fn.extend({text: function(n) {
            return i.access(this, function(n) {
                return n === t ? i.text(this) : this.empty().append((this[0] && this[0].ownerDocument || r).createTextNode(n))
            }, null, n, arguments.length)
        },wrapAll: function(n) {
            if (i.isFunction(n))
                return this.each(function(t) {
                    i(this).wrapAll(n.call(this, t))
                });
            if (this[0]) {
                var t = i(n, this[0].ownerDocument).eq(0).clone(!0);
                this[0].parentNode && t.insertBefore(this[0]), t.map(function() {
                    for (var n = this; n.firstChild && n.firstChild.nodeType === 1; )
                        n = n.firstChild;
                    return n
                }).append(this)
            }
            return this
        },wrapInner: function(n) {
            return i.isFunction(n) ? this.each(function(t) {
                i(this).wrapInner(n.call(this, t))
            }) : this.each(function() {
                var t = i(this), r = t.contents();
                r.length ? r.wrapAll(n) : t.append(n)
            })
        },wrap: function(n) {
            var t = i.isFunction(n);
            return this.each(function(r) {
                i(this).wrapAll(t ? n.call(this, r) : n)
            })
        },unwrap: function() {
            return this.parent().each(function() {
                i.nodeName(this, "body") || i(this).replaceWith(this.childNodes)
            }).end()
        },append: function() {
            return this.domManip(arguments, !0, function(n) {
                (this.nodeType === 1 || this.nodeType === 11) && this.appendChild(n)
            })
        },prepend: function() {
            return this.domManip(arguments, !0, function(n) {
                (this.nodeType === 1 || this.nodeType === 11) && this.insertBefore(n, this.firstChild)
            })
        },before: function() {
            if (!k(this[0]))
                return this.domManip(arguments, !1, function(n) {
                    this.parentNode.insertBefore(n, this)
                });
            if (arguments.length) {
                var n = i.clean(arguments);
                return this.pushStack(i.merge(n, this), "before", this.selector)
            }
        },after: function() {
            if (!k(this[0]))
                return this.domManip(arguments, !1, function(n) {
                    this.parentNode.insertBefore(n, this.nextSibling)
                });
            if (arguments.length) {
                var n = i.clean(arguments);
                return this.pushStack(i.merge(this, n), "after", this.selector)
            }
        },remove: function(n, t) {
            for (var r, u = 0; (r = this[u]) != null; u++)
                (!n || i.filter(n, [r]).length) && (!t && r.nodeType === 1 && (i.cleanData(r.getElementsByTagName("*")), i.cleanData([r])), r.parentNode && r.parentNode.removeChild(r));
            return this
        },empty: function() {
            for (var n, t = 0; (n = this[t]) != null; t++)
                for (n.nodeType === 1 && i.cleanData(n.getElementsByTagName("*")); n.firstChild; )
                    n.removeChild(n.firstChild);
            return this
        },clone: function(n, t) {
            return n = n == null ? !1 : n, t = t == null ? n : t, this.map(function() {
                return i.clone(this, n, t)
            })
        },html: function(n) {
            return i.access(this, function(n) {
                var r = this[0] || {}, u = 0, f = this.length;
                if (n === t)
                    return r.nodeType === 1 ? r.innerHTML.replace(re, "") : t;
                if (typeof n == "string" && !he.test(n) && (i.support.htmlSerialize || !at.test(n)) && (i.support.leadingWhitespace || !pt.test(n)) && !e[(di.exec(n) || ["", ""])[1].toLowerCase()]) {
                    n = n.replace(bi, "<$1></$2>");
                    try {
                        for (; u < f; u++)
                            r = this[u] || {}, r.nodeType === 1 && (i.cleanData(r.getElementsByTagName("*")), r.innerHTML = n);
                        r = 0
                    } catch (o) {
                    }
                }
                r && this.empty().append(n)
            }, null, n, arguments.length)
        },replaceWith: function(n) {
            return k(this[0]) ? this.length ? this.pushStack(i(i.isFunction(n) ? n() : n), "replaceWith", n) : this : i.isFunction(n) ? this.each(function(t) {
                var r = i(this), u = r.html();
                r.replaceWith(n.call(this, t, u))
            }) : (typeof n != "string" && (n = i(n).detach()), this.each(function() {
                var t = this.nextSibling, r = this.parentNode;
                i(this).remove(), t ? i(t).before(n) : i(r).append(n)
            }))
        },detach: function(n) {
            return this.remove(n, !0)
        },domManip: function(n, r, u) {
            n = [].concat.apply([], n);
            var h, o, f, a, e = 0, s = n[0], c = [], l = this.length;
            if (!i.support.checkClone && l > 1 && typeof s == "string" && ir.test(s))
                return this.each(function() {
                    i(this).domManip(n, r, u)
                });
            if (i.isFunction(s))
                return this.each(function(f) {
                    var e = i(this);
                    n[0] = s.call(this, f, r ? e.html() : t), e.domManip(n, r, u)
                });
            if (this[0]) {
                if (h = i.buildFragment(n, this, c), f = h.fragment, o = f.firstChild, f.childNodes.length === 1 && (f = o), o)
                    for (r = r && i.nodeName(o, "tr"), a = h.cacheable || l - 1; e < l; e++)
                        u.call(r && i.nodeName(this[e], "table") ? pf(this[e], "tbody") : this[e], e === a ? f : i.clone(f, !0, !0));
                f = o = null, c.length && i.each(c, function(n, t) {
                    t.src ? i.ajax ? i.ajax({url: t.src,type: "GET",dataType: "script",async: !1,global: !1,throws: !0}) : i.error("no ajax") : i.globalEval((t.text || t.textContent || t.innerHTML || "").replace(pe, "")), t.parentNode && t.parentNode.removeChild(t)
                })
            }
            return this
        }}), i.buildFragment = function(n, u, f) {
        var o, s, h, e = n[0];
        return u = u || r, u = (u[0] || u).ownerDocument || u[0] || u, typeof u.createDocumentFragment == "undefined" && (u = r), n.length === 1 && typeof e == "string" && e.length < 512 && u === r && e.charAt(0) === "<" && !ce.test(e) && (i.support.checkClone || !ir.test(e)) && (i.support.html5Clone || !at.test(e)) && (s = !0, o = i.fragments[e], h = o !== t), o || (o = u.createDocumentFragment(), i.clean(n, u, o, f), s && (i.fragments[e] = h && o)), {fragment: o,cacheable: s}
    }, i.fragments = {}, i.each({appendTo: "append",prependTo: "prepend",insertBefore: "before",insertAfter: "after",replaceAll: "replaceWith"}, function(n, t) {
        i.fn[n] = function(r) {
            var o, u = 0, s = [], f = i(r), h = f.length, e = this.length === 1 && this[0].parentNode;
            if ((e == null || e && e.nodeType === 11 && e.childNodes.length === 1) && h === 1)
                return f[t](this[0]), this;
            for (; u < h; u++)
                o = (u > 0 ? this.clone(!0) : this).get(), i(f[u])[t](o), s = s.concat(o);
            return this.pushStack(s, n, f.selector)
        }
    }), i.extend({clone: function(n, t, r) {
            var f, o, u, e;
            if (i.support.html5Clone || i.isXMLDoc(n) || !at.test("<" + n.nodeName + ">") ? e = n.cloneNode(!0) : (kt.innerHTML = n.outerHTML, kt.removeChild(e = kt.firstChild)), (!i.support.noCloneEvent || !i.support.noCloneChecked) && (n.nodeType === 1 || n.nodeType === 11) && !i.isXMLDoc(n))
                for (ru(n, e), f = ct(n), o = ct(e), u = 0; f[u]; ++u)
                    o[u] && ru(f[u], o[u]);
            if (t && (uu(n, e), r))
                for (f = ct(n), o = ct(e), u = 0; f[u]; ++u)
                    uu(f[u], o[u]);
            return f = o = null, e
        },clean: function(n, t, u, f) {
            var a, l, o, k, y, d, s, p, v, g, w, b, h = 0, c = [];
            for (t && typeof t.createDocumentFragment != "undefined" || (t = r), l = t === r && ur; (o = n[h]) != null; h++)
                if (typeof o == "number" && (o += ""), o) {
                    if (typeof o == "string")
                        if (se.test(o)) {
                            for (l = l || fu(t), s = s || l.appendChild(t.createElement("div")), o = o.replace(bi, "<$1></$2>"), k = (di.exec(o) || ["", ""])[1].toLowerCase(), y = e[k] || e._default, d = y[0], s.innerHTML = y[1] + o + y[2]; d--; )
                                s = s.lastChild;
                            if (!i.support.tbody)
                                for (p = oe.test(o), v = k === "table" && !p ? s.firstChild && s.firstChild.childNodes : y[1] === "<table>" && !p ? s.childNodes : [], a = v.length - 1; a >= 0; --a)
                                    i.nodeName(v[a], "tbody") && !v[a].childNodes.length && v[a].parentNode.removeChild(v[a]);
                            !i.support.leadingWhitespace && pt.test(o) && s.insertBefore(t.createTextNode(pt.exec(o)[0]), s.firstChild), o = s.childNodes, s = l.lastChild
                        } else
                            o = t.createTextNode(o);
                    o.nodeType ? c.push(o) : c = i.merge(c, o)
                }
            if (s && (l.removeChild(s), o = s = l = null), !i.support.appendChecked)
                for (h = 0; (o = c[h]) != null; h++)
                    i.nodeName(o, "input") ? iu(o) : typeof o.getElementsByTagName != "undefined" && i.grep(o.getElementsByTagName("input"), iu);
            if (u)
                for (w = function(n) {
                    if (!n.type || ye.test(n.type))
                        return f ? f.push(n.parentNode ? n.parentNode.removeChild(n) : n) : u.appendChild(n)
                }, h = 0; (o = c[h]) != null; h++)
                    i.nodeName(o, "script") && w(o) || (u.appendChild(o), typeof o.getElementsByTagName != "undefined" && (b = i.grep(i.merge([], o.getElementsByTagName("script")), w), c.splice.apply(c, [h + 1, 0].concat(b)), h += b.length));
            return c
        },cleanData: function(n, t) {
            for (var f, u, r, e, h = 0, o = i.expando, s = i.cache, c = i.support.deleteExpando, l = i.event.special; (r = n[h]) != null; h++)
                if ((t || i.acceptData(r)) && (u = r[o], f = u && s[u], f)) {
                    if (f.events)
                        for (e in f.events)
                            l[e] ? i.event.remove(r, e) : i.removeEvent(r, e, f.handle);
                    s[u] && (delete s[u], c ? delete r[o] : r.removeAttribute ? r.removeAttribute(o) : r[o] = null, i.deletedIds.push(u))
                }
        }}), function() {
        var t, n;
        i.uaMatch = function(n) {
            n = n.toLowerCase();
            var t = /(chrome)[ \/]([\w.]+)/.exec(n) || /(webkit)[ \/]([\w.]+)/.exec(n) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n) || /(msie) ([\w.]+)/.exec(n) || n.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n) || [];
            return {browser: t[1] || "",version: t[2] || "0"}
        }, t = i.uaMatch(be.userAgent), n = {}, t.browser && (n[t.browser] = !0, n.version = t.version), n.webkit && (n.safari = !0), i.browser = n, i.sub = function() {
            function n(t, i) {
                return new n.fn.init(t, i)
            }
            i.extend(!0, n, this), n.superclass = this, n.fn = n.prototype = this(), n.fn.constructor = n, n.sub = this.sub, n.fn.init = function t(c, r) {
                return r && r instanceof i && !(r instanceof n) && (r = n(r)), i.fn.init.call(this, t, r, u)
            }, n.fn.init.prototype = n.fn;
            var u = n(r);
            return n
        }
    }();
    var u, w, y, dt = /alpha\([^)]*\)/i, io = /opacity=([^)]*)/, ro = /^(top|right|bottom|left)$/, pi = /^margin/, fo = new RegExp("^(" + it + ")(.*)$", "i"), d = new RegExp("^(" + it + ")(?!px)[a-z%]+$", "i"), oo = new RegExp("^([-+])=(" + it + ")", "i"), ti = {}, ho = {position: "absolute",visibility: "hidden",display: "block"}, si = {letterSpacing: 0,fontWeight: 400,lineHeight: 1}, a = ["Top", "Right", "Bottom", "Left"], er = ["Webkit", "O", "Moz", "ms"], ao = i.fn.toggle;
    i.fn.extend({css: function(n, r) {
            return i.access(this, function(n, r, u) {
                return u !== t ? i.style(n, r, u) : i.css(n, r)
            }, n, r, arguments.length > 1)
        },show: function() {
            return nu(this, !0)
        },hide: function() {
            return nu(this)
        },toggle: function(n, t) {
            var r = typeof n == "boolean";
            return i.isFunction(n) && i.isFunction(t) ? ao.apply(this, arguments) : this.each(function() {
				//console.log(88);
                (r ? n : lt(this)) ? i(this).show() : i(this).hide()
            })
        }}), i.extend({cssHooks: {opacity: {get: function(n, t) {
                    if (t) {
                        var i = u(n, "opacity");
                        return i === "" ? "1" : i
                    }
                }}},cssNumber: {fillOpacity: !0,fontWeight: !0,lineHeight: !0,opacity: !0,orphans: !0,widows: !0,zIndex: !0,zoom: !0},cssProps: {float: i.support.cssFloat ? "cssFloat" : "styleFloat"},style: function(n, r, u, f) {
            if (n && n.nodeType !== 3 && n.nodeType !== 8 && n.style) {
                var o, s, e, h = i.camelCase(r), c = n.style;
                if (r = i.cssProps[h] || (i.cssProps[h] = tu(c, h)), e = i.cssHooks[r] || i.cssHooks[h], u === t)
                    return e && "get" in e && (o = e.get(n, !1, f)) !== t ? o : c[r];
                if ((s = typeof u, s === "string" && (o = oo.exec(u)) && (u = (o[1] + 1) * o[2] + parseFloat(i.css(n, r)), s = "number"), u != null && (s !== "number" || !isNaN(u))) && (s === "number" && !i.cssNumber[h] && (u += "px"), !e || !("set" in e) || (u = e.set(n, u, f)) !== t))
                    try {
                        c[r] = u
                    } catch (l) {
                    }
            }
        },css: function(n, r, f, e) {
            var o, c, s, h = i.camelCase(r);
            return r = i.cssProps[h] || (i.cssProps[h] = tu(n.style, h)), s = i.cssHooks[r] || i.cssHooks[h], s && "get" in s && (o = s.get(n, !0, e)), o === t && (o = u(n, r)), o === "normal" && r in si && (o = si[r]), f || e !== t ? (c = parseFloat(o), f || i.isNumeric(c) ? c || 0 : o) : o
        },swap: function(n, t, i) {
            var u, r, f = {};
            for (r in t)
                f[r] = n.style[r], n.style[r] = t[r];
            u = i.call(n);
            for (r in t)
                n.style[r] = f[r];
            return u
        }}), n.getComputedStyle ? u = function(n, t) {
        var u, e, o, s, f = getComputedStyle(n, null), r = n.style;
        return f && (u = f[t], u === "" && !i.contains(n.ownerDocument.documentElement, n) && (u = i.style(n, t)), d.test(u) && pi.test(t) && (e = r.width, o = r.minWidth, s = r.maxWidth, r.minWidth = r.maxWidth = r.width = u, u = f.width, r.width = e, r.minWidth = o, r.maxWidth = s)), u
    } : r.documentElement.currentStyle && (u = function(n, t) {
        var f, u, i = n.currentStyle && n.currentStyle[t], r = n.style;
        return i == null && r && r[t] && (i = r[t]), d.test(i) && !ro.test(t) && (f = r.left, u = n.runtimeStyle && n.runtimeStyle.left, u && (n.runtimeStyle.left = n.currentStyle.left), r.left = t === "fontSize" ? "1em" : i, i = r.pixelLeft + "px", r.left = f, u && (n.runtimeStyle.left = u)), i === "" ? "auto" : i
    }), i.each(["height", "width"], function(n, t) {
        i.cssHooks[t] = {get: function(n, r, f) {
                if (r)
                    return n.offsetWidth !== 0 || u(n, "display") !== "none" ? kr(n, t, f) : i.swap(n, ho, function() {
                        return kr(n, t, f)
                    })
            },set: function(n, r, u) {
                return gr(n, r, u ? dr(n, t, u, i.support.boxSizing && i.css(n, "boxSizing") === "border-box") : 0)
            }}
    }), i.support.opacity || (i.cssHooks.opacity = {get: function(n, t) {
            return io.test((t && n.currentStyle ? n.currentStyle.filter : n.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : t ? "1" : ""
        },set: function(n, t) {
            var r = n.style, u = n.currentStyle, e = i.isNumeric(t) ? "alpha(opacity=" + t * 100 + ")" : "", f = u && u.filter || r.filter || "";
            (r.zoom = 1, t >= 1 && i.trim(f.replace(dt, "")) === "" && r.removeAttribute && (r.removeAttribute("filter"), u && !u.filter)) || (r.filter = dt.test(f) ? f.replace(dt, e) : f + " " + e)
        }}), i(function() {
        i.support.reliableMarginRight || (i.cssHooks.marginRight = {get: function(n, t) {
                return i.swap(n, {display: "inline-block"}, function() {
                    if (t)
                        return u(n, "marginRight")
                })
            }}), !i.support.pixelPosition && i.fn.position && i.each(["top", "left"], function(n, t) {
            i.cssHooks[t] = {get: function(n, r) {
                    if (r) {
                        var f = u(n, t);
                        return d.test(f) ? i(n).position()[t] + "px" : f
                    }
                }}
        })
    }), i.expr && i.expr.filters && (i.expr.filters.hidden = function(n) {
        return n.offsetWidth === 0 && n.offsetHeight === 0 || !i.support.reliableHiddenOffsets && (n.style && n.style.display || u(n, "display")) === "none"
    }, i.expr.filters.visible = function(n) {
        return !i.expr.filters.hidden(n)
    }), i.each({margin: "",padding: "",border: "Width"}, function(n, t) {
        i.cssHooks[n + t] = {expand: function(i) {
                for (var u = typeof i == "string" ? i.split(" ") : [i], f = {}, r = 0; r < 4; r++)
                    f[n + a[r] + t] = u[r] || u[r - 2] || u[0];
                return f
            }}, pi.test(n) || (i.cssHooks[n + t].set = gr)
    });
    var vo = /%20/g, fe = /\[\]$/, gi = /\r?\n/g, yo = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, ie = /^(?:select|textarea)/i;
    i.fn.extend({serialize: function() {
            return i.param(this.serializeArray())
        },serializeArray: function() {
            return this.map(function() {
                return this.elements ? i.makeArray(this.elements) : this
            }).filter(function() {
                return this.name && !this.disabled && (this.checked || ie.test(this.nodeName) || yo.test(this.type))
            }).map(function(n, t) {
                var r = i(this).val();
                return r == null ? null : i.isArray(r) ? i.map(r, function(n) {
                    return {name: t.name,value: n.replace(gi, "\r\n")}
                }) : {name: t.name,value: r.replace(gi, "\r\n")}
            }).get()
        }}), i.param = function(n, r) {
        var u, f = [], e = function(n, t) {
            t = i.isFunction(t) ? t() : t == null ? "" : t, f[f.length] = encodeURIComponent(n) + "=" + encodeURIComponent(t)
        };
        if (r === t && (r = i.ajaxSettings && i.ajaxSettings.traditional), i.isArray(n) || n.jquery && !i.isPlainObject(n))
            i.each(n, function() {
                e(this.name, this.value)
            });
        else
            for (u in n)
                gt(u, n[u], r, e);
        return f.join("&").replace(vo, "+")
    };
    var h, c, bu = /#.*$/, ku = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, du = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, gu = /^(?:GET|HEAD)$/, nf = /^\/\//, wi = /\?/, rf = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, uf = /([?&])_=[^&]*/, ki = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, rr = i.fn.load, ni = {}, fr = {}, yi = ["*/"] + ["*"];
    try {
        h = ke.href
    } catch (po) {
        h = r.createElement("a"), h.href = "", h = h.href
    }
    c = ki.exec(h.toLowerCase()) || [], i.fn.load = function(n, r, u) {
        if (typeof n != "string" && rr)
            return rr.apply(this, arguments);
        if (!this.length)
            return this;
        var f, o, s, h = this, e = n.indexOf(" ");
        return e >= 0 && (f = n.slice(e, n.length), n = n.slice(0, e)), i.isFunction(r) ? (u = r, r = t) : typeof r == "object" && (o = "POST"), i.ajax({url: n,type: o,dataType: "html",data: r,complete: function(n, t) {
                u && h.each(u, s || [n.responseText, t, n])
            }}).done(function(n) {
            s = arguments, h.html(f ? i("<div>").append(n.replace(rf, "")).find(f) : n)
        }), this
    }, i.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function(n, t) {
        i.fn[t] = function(n) {
            return this.on(t, n)
        }
    }), i.each(["get", "post"], function(n, r) {
        i[r] = function(n, u, f, e) {
            return i.isFunction(u) && (e = e || f, f = u, u = t), i.ajax({type: r,url: n,data: u,success: f,dataType: e})
        }
    }), i.extend({getScript: function(n, r) {
            return i.get(n, t, r, "script")
        },getJSON: function(n, t, r) {
            return i.get(n, t, r, "json")
        },ajaxSetup: function(n, t) {
            return t ? pr(n, i.ajaxSettings) : (t = n, n = i.ajaxSettings), pr(n, t), n
        },ajaxSettings: {url: h,isLocal: du.test(c[1]),global: !0,type: "GET",contentType: "application/x-www-form-urlencoded; charset=UTF-8",processData: !0,async: !0,accepts: {xml: "application/xml, text/xml",html: "text/html",text: "text/plain",json: "application/json, text/javascript","*": yi},contents: {xml: /xml/,html: /html/,json: /json/},responseFields: {xml: "responseXML",text: "responseText"},converters: {"* text": n.String,"text html": !0,"text json": i.parseJSON,"text xml": i.parseXML},flatOptions: {context: !0,url: !0}},ajaxPrefilter: wr(ni),ajaxTransport: wr(fr),ajax: function(n, r) {
            function b(n, r, h, c) {
                var l, d, b, tt, p, a = r;
                e !== 2 && (e = 2, k && clearTimeout(k), v = t, it = c || "", f.readyState = n > 0 ? 4 : 0, h && (tt = ue(u, f, h)), n >= 200 && n < 300 || n === 304 ? (u.ifModified && (p = f.getResponseHeader("Last-Modified"), p && (i.lastModified[o] = p), p = f.getResponseHeader("Etag"), p && (i.etag[o] = p)), n === 304 ? (a = "notmodified", l = !0) : (l = lo(u, tt), a = l.state, d = l.data, b = l.error, l = !b)) : (b = a, (!a || n) && (a = "error", n < 0 && (n = 0))), f.status = n, f.statusText = "" + (r || a), l ? nt.resolveWith(s, [d, a, f]) : nt.rejectWith(s, [f, a, b]), f.statusCode(w), w = t, y && g.trigger("ajax" + (l ? "Success" : "Error"), [f, u, l ? d : b]), rt.fireWith(s, [f, a]), y && (g.trigger("ajaxComplete", [f, u]), --i.active || i.event.trigger("ajaxStop")))
            }
            var tt, d;
            typeof n == "object" && (r = n, n = t), r = r || {};
            var o, it, p, v, k, h, y, a, u = i.ajaxSetup({}, r), s = u.context || u, g = s !== u && (s.nodeType || s instanceof i) ? i(s) : i.event, nt = i.Deferred(), rt = i.Callbacks("once memory"), w = u.statusCode || {}, ft = {}, ut = {}, e = 0, et = "canceled", f = {readyState: 0,setRequestHeader: function(n, t) {
                    if (!e) {
                        var i = n.toLowerCase();
                        n = ut[i] = ut[i] || n, ft[n] = t
                    }
                    return this
                },getAllResponseHeaders: function() {
                    return e === 2 ? it : null
                },getResponseHeader: function(n) {
                    var i;
                    if (e === 2) {
                        if (!p)
                            for (p = {}; i = ku.exec(it); )
                                p[i[1].toLowerCase()] = i[2];
                        i = p[n.toLowerCase()]
                    }
                    return i === t ? null : i
                },overrideMimeType: function(n) {
                    return e || (u.mimeType = n), this
                },abort: function(n) {
                    return n = n || et, v && v.abort(n), b(0, n), this
                }};
            if (nt.promise(f), f.success = f.done, f.error = f.fail, f.complete = rt.add, f.statusCode = function(n) {
                if (n) {
                    var t;
                    if (e < 2)
                        for (t in n)
                            w[t] = [w[t], n[t]];
                    else
                        t = n[f.status], f.always(t)
                }
                return this
            }, u.url = ((n || u.url) + "").replace(bu, "").replace(nf, c[1] + "//"), u.dataTypes = i.trim(u.dataType || "*").toLowerCase().split(l), u.crossDomain == null && (h = ki.exec(u.url.toLowerCase()), u.crossDomain = !(!h || h[1] == c[1] && h[2] == c[2] && (h[3] || (h[1] === "http:" ? 80 : 443)) == (c[3] || (c[1] === "http:" ? 80 : 443)))), u.data && u.processData && typeof u.data != "string" && (u.data = i.param(u.data, u.traditional)), ot(ni, u, r, f), e === 2)
                return f;
            y = u.global, u.type = u.type.toUpperCase(), u.hasContent = !gu.test(u.type), y && i.active++ == 0 && i.event.trigger("ajaxStart"), u.hasContent || (u.data && (u.url += (wi.test(u.url) ? "&" : "?") + u.data, delete u.data), o = u.url, u.cache === !1 && (tt = i.now(), d = u.url.replace(uf, "$1_=" + tt), u.url = d + (d === u.url ? (wi.test(u.url) ? "&" : "?") + "_=" + tt : ""))), (u.data && u.hasContent && u.contentType !== !1 || r.contentType) && f.setRequestHeader("Content-Type", u.contentType), u.ifModified && (o = o || u.url, i.lastModified[o] && f.setRequestHeader("If-Modified-Since", i.lastModified[o]), i.etag[o] && f.setRequestHeader("If-None-Match", i.etag[o])), f.setRequestHeader("Accept", u.dataTypes[0] && u.accepts[u.dataTypes[0]] ? u.accepts[u.dataTypes[0]] + (u.dataTypes[0] !== "*" ? ", " + yi + "; q=0.01" : "") : u.accepts["*"]);
            for (a in u.headers)
                f.setRequestHeader(a, u.headers[a]);
            if (!u.beforeSend || u.beforeSend.call(s, f, u) !== !1 && e !== 2) {
                et = "abort";
                for (a in {success: 1,error: 1,complete: 1})
                    f[a](u[a]);
                if (v = ot(fr, u, r, f), v) {
                    f.readyState = 1, y && g.trigger("ajaxSend", [f, u]), u.async && u.timeout > 0 && (k = setTimeout(function() {
                        f.abort("timeout")
                    }, u.timeout));
                    try {
                        e = 1, v.send(ft, b)
                    } catch (st) {
                        if (e < 2)
                            b(-1, st);
                        else
                            throw st;
                    }
                } else
                    b(-1, "No Transport");
                return f
            }
            return f.abort()
        },active: 0,lastModified: {},etag: {}});
    var nr = [], lf = /\?/, ht = /(=)\?(?=&|$)|\?\?/, vf = i.now();
    i.ajaxSetup({jsonp: "callback",jsonpCallback: function() {
            var n = nr.pop() || i.expando + "_" + vf++;
            return this[n] = !0, n
        }}), i.ajaxPrefilter("json jsonp", function(r, u, f) {
        var e, s, o, h = r.data, c = r.url, l = r.jsonp !== !1, a = l && ht.test(c), v = l && !a && typeof h == "string" && !(r.contentType || "").indexOf("application/x-www-form-urlencoded") && ht.test(h);
        if (r.dataTypes[0] === "jsonp" || a || v)
            return e = r.jsonpCallback = i.isFunction(r.jsonpCallback) ? r.jsonpCallback() : r.jsonpCallback, s = n[e], a ? r.url = c.replace(ht, "$1" + e) : v ? r.data = h.replace(ht, "$1" + e) : l && (r.url += (lf.test(c) ? "&" : "?") + r.jsonp + "=" + e), r.converters["script json"] = function() {
                return o || i.error(e + " was not called"), o[0]
            }, r.dataTypes[0] = "json", n[e] = function() {
                o = arguments
            }, f.always(function() {
                n[e] = s, r[e] && (r.jsonpCallback = u.jsonpCallback, nr.push(e)), o && i.isFunction(s) && s(o[0]), o = s = t
            }), "script"
    }), i.ajaxSetup({accepts: {script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents: {script: /javascript|ecmascript/},converters: {"text script": function(n) {
                return i.globalEval(n), n
            }}}), i.ajaxPrefilter("script", function(n) {
        n.cache === t && (n.cache = !1), n.crossDomain && (n.type = "GET", n.global = !1)
    }), i.ajaxTransport("script", function(n) {
        if (n.crossDomain) {
            var i, u = r.head || r.getElementsByTagName("head")[0] || r.documentElement;
            return {send: function(f, e) {
                    i = r.createElement("script"), i.async = "async", n.scriptCharset && (i.charset = n.scriptCharset), i.src = n.url, i.onload = i.onreadystatechange = function(n, r) {
                        (r || !i.readyState || /loaded|complete/.test(i.readyState)) && (i.onload = i.onreadystatechange = null, u && i.parentNode && u.removeChild(i), i = t, r || e(200, "success"))
                    }, u.insertBefore(i, u.firstChild)
                },abort: function() {
                    i && i.onload(0, 1)
                }}
        }
    }), st = n.ActiveXObject ? function() {
        for (var n in v)
            v[n](0, 1)
    } : !1, ui = 0, i.ajaxSettings.xhr = n.ActiveXObject ? function() {
        return !this.isLocal && yr() || co()
    } : yr, function(n) {
        i.extend(i.support, {ajax: !!n,cors: !!n && "withCredentials" in n})
    }(i.ajaxSettings.xhr()), i.support.ajax && i.ajaxTransport(function(r) {
        if (!r.crossDomain || i.support.cors) {
            var u;
            return {send: function(f, e) {
                    var h, s, o = r.xhr();
                    if (r.username ? o.open(r.type, r.url, r.async, r.username, r.password) : o.open(r.type, r.url, r.async), r.xhrFields)
                        for (s in r.xhrFields)
                            o[s] = r.xhrFields[s];
                    r.mimeType && o.overrideMimeType && o.overrideMimeType(r.mimeType), !r.crossDomain && !f["X-Requested-With"] && (f["X-Requested-With"] = "XMLHttpRequest");
                    try {
                        for (s in f)
                            o.setRequestHeader(s, f[s])
                    } catch (c) {
                    }
                    o.send(r.hasContent && r.data || null), u = function(n, f) {
                        var s, a, y, c, l;
                        try {
                            if (u && (f || o.readyState === 4))
                                if (u = t, h && (o.onreadystatechange = i.noop, st && delete v[h]), f)
                                    o.readyState !== 4 && o.abort();
                                else {
                                    s = o.status, y = o.getAllResponseHeaders(), c = {}, l = o.responseXML, l && l.documentElement && (c.xml = l);
                                    try {
                                        c.text = o.responseText
                                    } catch (n) {
                                    }
                                    try {
                                        a = o.statusText
                                    } catch (p) {
                                        a = ""
                                    }
                                    !s && r.isLocal && !r.crossDomain ? s = c.text ? 200 : 404 : s === 1223 && (s = 204)
                                }
                        } catch (w) {
                            f || e(-1, w)
                        }
                        c && e(s, a, c, y)
                    }, r.async ? o.readyState === 4 ? setTimeout(u, 0) : (h = ++ui, st && (v || (v = {}, i(n).unload(st)), v[h] = u), o.onreadystatechange = u) : u()
                },abort: function() {
                    u && u(0, 1)
                }}
        }
    });
    var ft, nt, df = /^(?:toggle|show|hide)$/, gf = new RegExp("^(?:([-+])=|)(" + it + ")([a-z%]*)$", "i"), ne = /queueHooks$/, tt = [no], b = {"*": [function(n, t) {
                var o, s, h, r = this.createTween(n, t), e = gf.exec(t), c = r.cur(), u = +c || 0, f = 1;
                if (e) {
                    if (o = +e[2], s = e[3] || (i.cssNumber[n] ? "" : "px"), s !== "px" && u) {
                        u = i.css(r.elem, n, !0) || o || 1;
                        do
                            h = f = f || ".5", u = u / f, i.style(r.elem, n, u + s), f = r.cur() / c;
                        while (f !== 1 && f !== h)
                    }
                    r.unit = s, r.start = u, r.end = e[1] ? u + (e[1] + 1) * o : o
                }
                return r
            }]};
    i.Animation = i.extend(lu, {tweener: function(n, t) {
            i.isFunction(n) ? (t = n, n = ["*"]) : n = n.split(" ");
            for (var r, u = 0, f = n.length; u < f; u++)
                r = n[u], b[r] = b[r] || [], b[r].unshift(t)
        },prefilter: function(n, t) {
            t ? tt.unshift(n) : tt.push(n)
        }}), i.Tween = f, f.prototype = {constructor: f,init: function(n, t, r, u, f, e) {
            this.elem = n, this.prop = r, this.easing = f || "swing", this.options = t, this.start = this.now = this.cur(), this.end = u, this.unit = e || (i.cssNumber[r] ? "" : "px")
        },cur: function() {
            var n = f.propHooks[this.prop];
            return n && n.get ? n.get(this) : f.propHooks._default.get(this)
        },run: function(n) {
            var r, t = f.propHooks[this.prop];
            return this.pos = r = i.easing[this.easing](n, this.options.duration * n, 0, 1, this.options.duration), this.now = (this.end - this.start) * r + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), t && t.set ? t.set(this) : f.propHooks._default.set(this), this
        }}, f.prototype.init.prototype = f.prototype, f.propHooks = {_default: {get: function(n) {
                var t;
                return n.elem[n.prop] == null || !!n.elem.style && n.elem.style[n.prop] != null ? (t = i.css(n.elem, n.prop, !1, ""), !t || t === "auto" ? 0 : t) : n.elem[n.prop]
            },set: function(n) {
                i.fx.step[n.prop] ? i.fx.step[n.prop](n) : n.elem.style && (n.elem.style[i.cssProps[n.prop]] != null || i.cssHooks[n.prop]) ? i.style(n.elem, n.prop, n.now + n.unit) : n.elem[n.prop] = n.now
            }}}, f.propHooks.scrollTop = f.propHooks.scrollLeft = {set: function(n) {
            n.elem.nodeType && n.elem.parentNode && (n.elem[n.prop] = n.now)
        }}, i.each(["toggle", "show", "hide"], function(n, t) {
        var r = i.fn[t];
        i.fn[t] = function(u, f, e) {
            return u == null || typeof u == "boolean" || !n && i.isFunction(u) && i.isFunction(f) ? r.apply(this, arguments) : this.animate(ut(t, !0), u, f, e)
        }
    }), i.fn.extend({fadeTo: function(n, t, i, r) {
            return this.filter(lt).css("opacity", 0).show().end().animate({opacity: t}, n, i, r)
        },animate: function(n, t, r, u) {
            var e = i.isEmptyObject(n), f = i.speed(t, r, u), o = function() {
                var t = lu(this, i.extend({}, n), f);
                e && t.stop(!0)
            };
            return e || f.queue === !1 ? this.each(o) : this.queue(f.queue, o)
        },stop: function(n, r, u) {
            var f = function(n) {
                var t = n.stop;
                delete n.stop, t(u)
            };
            return typeof n != "string" && (u = r, r = n, n = t), r && n !== !1 && this.queue(n || "fx", []), this.each(function() {
                var o = !0, t = n != null && n + "queueHooks", e = i.timers, r = i._data(this);
                if (t)
                    r[t] && r[t].stop && f(r[t]);
                else
                    for (t in r)
                        r[t] && r[t].stop && ne.test(t) && f(r[t]);
                for (t = e.length; t--; )
                    e[t].elem === this && (n == null || e[t].queue === n) && (e[t].anim.stop(u), o = !1, e.splice(t, 1));
                (o || !u) && i.dequeue(this, n)
            })
        }}), i.each({slideDown: ut("show"),slideUp: ut("hide"),slideToggle: ut("toggle"),fadeIn: {opacity: "show"},fadeOut: {opacity: "hide"},fadeToggle: {opacity: "toggle"}}, function(n, t) {
        i.fn[n] = function(n, i, r) {
            return this.animate(t, n, i, r)
        }
    }), i.speed = function(n, t, r) {
        var u = n && typeof n == "object" ? i.extend({}, n) : {complete: r || !r && t || i.isFunction(n) && n,duration: n,easing: r && t || t && !i.isFunction(t) && t};
        return u.duration = i.fx.off ? 0 : typeof u.duration == "number" ? u.duration : u.duration in i.fx.speeds ? i.fx.speeds[u.duration] : i.fx.speeds._default, (u.queue == null || u.queue === !0) && (u.queue = "fx"), u.old = u.complete, u.complete = function() {
            i.isFunction(u.old) && u.old.call(this), u.queue && i.dequeue(this, u.queue)
        }, u
    }, i.easing = {linear: function(n) {
            return n
        },swing: function(n) {
            return .5 - Math.cos(n * Math.PI) / 2
        }}, i.timers = [], i.fx = f.prototype.init, i.fx.tick = function() {
        for (var r, n = i.timers, t = 0; t < n.length; t++)
            r = n[t], !r() && n[t] === r && n.splice(t--, 1);
        n.length || i.fx.stop()
    }, i.fx.timer = function(n) {
        n() && i.timers.push(n) && !nt && (nt = setInterval(i.fx.tick, i.fx.interval))
    }, i.fx.interval = 13, i.fx.stop = function() {
        clearInterval(nt), nt = null
    }, i.fx.speeds = {slow: 600,fast: 200,_default: 400}, i.fx.step = {}, i.expr && i.expr.filters && (i.expr.filters.animated = function(n) {
        return i.grep(i.timers, function(t) {
            return n === t.elem
        }).length
    }), vt = /^(?:body|html)$/i, i.fn.offset = function(n) {
        if (arguments.length)
            return n === t ? this : this.each(function(t) {
                i.offset.setOffset(this, n, t)
            });
        var e, r, o, s, h, c, l, a, v, y, u = this[0], f = u && u.ownerDocument;
        if (f)
            return (o = f.body) === u ? i.offset.bodyOffset(u) : (r = f.documentElement, i.contains(r, u) ? (e = u.getBoundingClientRect(), s = lr(f), h = r.clientTop || o.clientTop || 0, c = r.clientLeft || o.clientLeft || 0, l = s.pageYOffset || r.scrollTop, a = s.pageXOffset || r.scrollLeft, v = e.top + l - h, y = e.left + a - c, {top: v,left: y}) : {top: 0,left: 0})
    }, i.offset = {bodyOffset: function(n) {
            var t = n.offsetTop, r = n.offsetLeft;
            return i.support.doesNotIncludeMarginInBodyOffset && (t += parseFloat(i.css(n, "marginTop")) || 0, r += parseFloat(i.css(n, "marginLeft")) || 0), {top: t,left: r}
        },setOffset: function(n, t, r) {
            var f = i.css(n, "position");
            f === "static" && (n.style.position = "relative");
            var e = i(n), o = e.offset(), l = i.css(n, "top"), a = i.css(n, "left"), v = (f === "absolute" || f === "fixed") && i.inArray("auto", [l, a]) > -1, u = {}, s = {}, h, c;
            v ? (s = e.position(), h = s.top, c = s.left) : (h = parseFloat(l) || 0, c = parseFloat(a) || 0), i.isFunction(t) && (t = t.call(n, r, o)), t.top != null && (u.top = t.top - o.top + h), t.left != null && (u.left = t.left - o.left + c), "using" in t ? t.using.call(n, u) : e.css(u)
        }}, i.fn.extend({position: function() {
            if (this[0]) {
                var u = this[0], n = this.offsetParent(), t = this.offset(), r = vt.test(n[0].nodeName) ? {top: 0,left: 0} : n.offset();
                return t.top -= parseFloat(i.css(u, "marginTop")) || 0, t.left -= parseFloat(i.css(u, "marginLeft")) || 0, r.top += parseFloat(i.css(n[0], "borderTopWidth")) || 0, r.left += parseFloat(i.css(n[0], "borderLeftWidth")) || 0, {top: t.top - r.top,left: t.left - r.left}
            }
        },offsetParent: function() {
            return this.map(function() {
                for (var n = this.offsetParent || r.body; n && !vt.test(n.nodeName) && i.css(n, "position") === "static"; )
                    n = n.offsetParent;
                return n || r.body
            })
        }}), i.each({scrollLeft: "pageXOffset",scrollTop: "pageYOffset"}, function(n, r) {
        var u = /Y/.test(r);
        i.fn[n] = function(f) {
            return i.access(this, function(n, f, e) {
                var o = lr(n);
                if (e === t)
                    return o ? r in o ? o[r] : o.document.documentElement[f] : n[f];
                o ? o.scrollTo(u ? i(o).scrollLeft() : e, u ? e : i(o).scrollTop()) : n[f] = e
            }, n, f, arguments.length, null)
        }
    }), i.each({Height: "height",Width: "width"}, function(n, r) {
        i.each({padding: "inner" + n,content: r,"": "outer" + n}, function(u, f) {
            i.fn[f] = function(f, e) {
                var o = arguments.length && (u || typeof f != "boolean"), s = u || (f === !0 || e === !0 ? "margin" : "border");
                return i.access(this, function(r, u, f) {
                    var e;
                    return i.isWindow(r) ? r.document.documentElement["client" + n] : r.nodeType === 9 ? (e = r.documentElement, Math.max(r.body["scroll" + n], e["scroll" + n], r.body["offset" + n], e["offset" + n], e["client" + n])) : f === t ? i.css(r, u, f, s) : i.style(r, u, f, s)
                }, r, o ? f : t, o)
            }
        })
    }), n.jQuery = n.$ = i, typeof define == "function" && define.amd && define.amd.jQuery && define("jquery", [], function() {
        return i
    })
})(window), String.prototype.trim = function() {
    return this.replace(/(^\s*)|(\s*$)/g, "")
}, String.prototype.trimAll = function() {
    return this.replace(/\s*/g, "")
}, String.prototype.replaceFormat = function(n) {
    var t = /{(\d+)}/gm;
    return this.replace(t, function(t, i) {
        return n[~~i]
    })
}, String.prototype.replaceAll = function(n, t) {
    return this.replace(new RegExp(n, "gm"), t)
}, String.prototype.startWith = function(n) {
    return typeof n != "string" ? !1 : this.indexOf(n) == 0
}, String.prototype.endWith = function(n) {
    if (typeof n != "string")
        return !1;
    var t = this.length - n.length;
    return t >= 0 && this.lastIndexOf(n) === t
}, String.prototype.getLastString = function(n) {
    return this.substr(this.length - n)
}, String.prototype.toArray = function() {
    for (var t = [], n = 0; n < this.length; n++)
        t.push(this[n]);
    return t
}, String.prototype.sortAsc = function() {
    return this.toArray().sort().join("")
}, String.prototype.sortDesc = function() {
    return this.toArray().sort().reverse().join("")
}, String.prototype.maxShow = function(n) {
    return this.length > n ? this.substr(0, n) + "..." : this
}, Number.prototype.toFixedNum = function(n) {
    return parseFloat(this.toFixed(n))
}, Array.prototype.each = function(n) {
    for (var t = 0; t < this.length; t++)
        if (n(this[t], t) == !1)
            break;
    return this
}, Array.prototype.where = function(n) {
    var t = [];
    return this.each(function(i, r) {
        n(i, r) == !0 && t.push(i)
    }), t
}, Array.prototype.first = function() {
    return this.length == 0 ? null : this[0]
}, Array.prototype.last = function() {
    return this.length == 0 ? null : this[this.length - 1]
}, Array.prototype.take = function(n) {
    for (var i = [], t = 0; t < n; t++)
        i.push(this[t]);
    return i
}, Array.prototype.skip = function(n) {
    for (var i = [], t = n; t < this.length; t++)
        i.push(this[t]);
    return i
}, Array.prototype.dive = function(n) {
    for (var i = [], t = 0; t < this.length; t++)
        n.indexOf(this[t]) == -1 && i.push(this[t]);
    return i
}, Array.prototype.distinct = function() {
    for (var r = {}, u = [], f = this.length, t, i, n = 0; n < f; n++)
        t = this[n], i = typeof t + t, r[i] === undefined && (u.push(t), r[i] = 1);
    return u
}, Array.prototype.select = function(n) {
    var t = [];
    return this.each(function(i, r) {
        n(i, r) && t.push(i)
    }), t
}, Array.prototype.remove = function(n) {
    var i = [], t;
    return this.each(function(t, r) {
        n(t, r) && i.push(r)
    }), t = this, i.reverse().each(function(n) {
        t.splice(n, 1)
    }), t
}, Array.prototype.removeElement = function(n) {
    return this.remove(function(t) {
        return t == n
    })
}, Array.prototype.removeAt = function() {
    return this.remove(function(n, t) {
        return t == t
    })
}, Array.prototype.indexOf = function(n) {
    var t = -1;
    return this.each(function(i, r) {
        if (i == n)
            return t = r, !1
    }), t
}, Array.prototype.contain = function(n) {
    return this.indexOf(n) >= 0
}, DateFormatStr = {dateTime1: "YYYY-MM-DD hh:mm:ss",dateTime2: "YYYY/MM/DD hh:mm:ss",longDate: "YYYY/MM/DD",shortDate: "YY/M/D",longTime: "hh:mm:ss",shortTime: "h:m:s",isoDate: "YYYY-MM-DD",isoTime: "hh:mm:ss",isoDateTime: "YYYY-MM-DD'T'hh:mm:ss",isoUtcDateTime: "UTC:YYYY-MM-DD'T'hh:mm:ss'Z'"}, Date.prototype.Format = function(n) {
    var t = n, i = ["日", "一", "二", "三", "四", "五", "六"];
    return t = t.replace(/yyyy|YYYY/, this.getFullYear()), t = t.replace(/yy|YY/, this.getYear() % 100 > 9 ? (this.getYear() % 100).toString() : "0" + this.getYear() % 100), t = t.replace(/MM/, this.getMonth() > 8 ? (this.getMonth() + 1).toString() : "0" + (this.getMonth() + 1).toString()), t = t.replace(/M/g, this.getMonth() + 1), t = t.replace(/w|W/g, i[this.getDay()]), t = t.replace(/dd|DD/, this.getDate() > 9 ? this.getDate().toString() : "0" + this.getDate()), t = t.replace(/d|D/g, this.getDate()), t = t.replace(/hh|HH/, this.getHours() > 9 ? this.getHours().toString() : "0" + this.getHours()), t = t.replace(/h|H/g, this.getHours()), t = t.replace(/mm/, this.getMinutes() > 9 ? this.getMinutes().toString() : "0" + this.getMinutes()), t = t.replace(/m/g, this.getMinutes()), t = t.replace(/ss|SS/, this.getSeconds() > 9 ? this.getSeconds().toString() : "0" + this.getSeconds()), t = t.replace(/s|S/g, this.getSeconds())
}, Date.prototype.DateAdd = function(n, t) {
    var i = this;
    switch (n) {
        case "sec":
            return new Date(Date.parse(i) + 1e3 * t);
        case "min":
            return new Date(Date.parse(i) + 6e4 * t);
        case "hour":
            return new Date(Date.parse(i) + 36e5 * t);
        case "day":
            return new Date(Date.parse(i) + 864e5 * t);
        case "week":
            return new Date(Date.parse(i) + 6048e5 * t);
        case "qua":
            return new Date(i.getFullYear(), i.getMonth() + t * 3, i.getDate(), i.getHours(), i.getMinutes(), i.getSeconds());
        case "month":
            return new Date(i.getFullYear(), i.getMonth() + t, i.getDate(), i.getHours(), i.getMinutes(), i.getSeconds());
        case "year":
            return new Date(i.getFullYear() + t, i.getMonth(), i.getDate(), i.getHours(), i.getMinutes(), i.getSeconds())
    }
    return undefined
}, hash = {"qq.com": "http://mail.qq.com","gmail.com": "http://mail.google.com","sina.com": "http://mail.sina.com.cn","163.com": "http://mail.163.com","126.com": "http://mail.126.com","yeah.net": "http://www.yeah.net/","sohu.com": "http://mail.sohu.com/","tom.com": "http://mail.tom.com/","sogou.com": "http://mail.sogou.com/","139.com": "http://mail.10086.cn/","hotmail.com": "http://www.hotmail.com","live.com": "http://login.live.com/","live.cn": "http://login.live.cn/","live.com.cn": "http://login.live.com.cn","189.com": "http://webmail16.189.cn/webmail/","yahoo.com.cn": "http://mail.cn.yahoo.com/","yahoo.cn": "http://mail.cn.yahoo.com/","eyou.com": "http://www.eyou.com/","21cn.com": "http://mail.21cn.com/","188.com": "http://www.188.com/","foxmail.coom": "http://www.foxmail.com","vip.163.com": "http://vip.163.com","outlook.com": "http://login.live.com"}, ctx = {isDebug: getIsDebug(),ajaxTimeout: 6e5,httpsEnabled: !1,userId: "",pageSize: 20,enterEvent: undefined,receiveSocketLottery: undefined,receiveSocketAward: undefined,bettingNoMediaSound: 0,pcHallRoundBegining: 0,ajaxCount: 0}, $("input").bind("keypress", function(n) {
    var t = t || window.event;
    t.keyCode == 13 && ctx.enterEvent && ctx.enterEvent(n)
}), ctx.isAndroid = function() {
    var n = navigator.userAgent;
    return n.indexOf("Android") >= 0 ? !0 : !1
}, ctx.androidVersion = function() {
    var n = navigator.userAgent;
    return parseFloat(n.slice(n.indexOf("Android") + 8))
}, ctx.androidLow = function() {
    return ctx.isAndroid() && ctx.androidVersion() < 3
}, ctx.isIpad = function() {
    return navigator.userAgent.match(/iPad/i) != null
}, ctx.isIE = function() {
    return $.browser.msie
}, ctx.ajax = function(n) {
    return n = $.extend({timeout: ctx.ajaxTimeout,beforeSend: function() {
            ctx.ajaxCount += 1
        },complete: function() {
            ctx.ajaxCount -= 1
        },error: function(t) {
            ctx.isDebug ? alert("请示Url：" + n.url + "......\n" + t.responseText) : t.responseText && t.responseText == "ajax_login" ? location.href = "/" : t.responseText && t.responseText == "IsMaintain" && (location.href = "/Maintain")
        }}, n), $.ajax(n)
}, ctx.postToken = function(n, t, i, r, u) {
    var f;
    return f = $("input[name=__RequestVerificationToken]").length == 1 ? $.extend(t, {__RequestVerificationToken: $("input[name=__RequestVerificationToken]").val()}) : t, ctx.ajax({url: n,data: f,type: "post",dataType: "json",headers: u,success: i,error: r})
}, ctx.postTokenEx = function(n) {
    var i = {type: "post",dataType: "json"}, t;
    return $("input[name=__RequestVerificationToken]").length >= 1 ? (t = n.data || n.Data, t = t ? $.extend(t, {__RequestVerificationToken: $("input[name=__RequestVerificationToken]").val()}) : {__RequestVerificationToken: $("input[name=__RequestVerificationToken]").val()}, i = $.extend(i, n, {data: t})) : i = $.extend(i, n), ctx.ajax(i)
}, ctx.postJSON = function(n, t, i, r, u) {
    return ctx.ajax({url: n,data: t,type: "post",dataType: "json",headers: u,success: i,error: r})
}, ctx.getJSON = function(n, t, i, r) {
    return ctx.ajax({url: n,type: "get",dataType: "json",headers: r,success: t,error: i})
}, ctx.getHtml = function(n, t, i, r) {
    return ctx.ajax({url: n,type: "get",dataType: "html",headers: r,success: t,error: i})
}, $.iMobile = {browserInfo: function() {
        return navigator.userAgent
    },isMobile: function() {
        return !!$.iMobile.browserInfo().match(/Mobile|Android|U/)
    },isIPhone: function() {
        return !!$.iMobile.browserInfo().match(/iPhone OS/)
    },isBelowIPhone5: function() {
        return !!$.iMobile.browserInfo().match(/iPhone OS/) && window.screen.height == 480
    },isIPhone5: function() {
        return !!$.iMobile.browserInfo().match(/iPhone OS/) && window.screen.height == 568
    },isWinPhone: function() {
        return !!$.iMobile.browserInfo().match(/Windows Phone OS/)
    }}, jQuery.fn.extend({everyTime: function(n, t, i, r) {
        return this.each(function() {
            jQuery.timer.add(this, n, t, i, r)
        })
    },oneTime: function(n, t, i) {
        return this.each(function() {
            jQuery.timer.add(this, n, t, i, 1)
        })
    },stopTime: function(n, t) {
        return this.each(function() {
            jQuery.timer.remove(this, n, t)
        })
    }}), jQuery.extend({timer: {global: [],guid: 1,dataKey: "jQuery.timer",regex: /^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,powers: {ms: 1,cs: 10,ds: 100,s: 1e3,das: 1e4,hs: 1e5,ks: 1e6},timeParse: function(n) {
            var t, i, r;
            return n == undefined || n == null ? null : (t = this.regex.exec(jQuery.trim(n.toString())), t[2] ? (i = parseFloat(t[1]), r = this.powers[t[2]] || 1, i * r) : n)
        },add: function(n, t, i, r, u) {
            var o = 0, f, e;
            (jQuery.isFunction(i) && (u || (u = r), r = i, i = t), t = jQuery.timer.timeParse(t), typeof t != "number" || isNaN(t) || t < 0) || ((typeof u != "number" || isNaN(u) || u < 0) && (u = 0), u = u || 0, f = jQuery.data(n, this.dataKey) || jQuery.data(n, this.dataKey, {}), f[i] || (f[i] = {}), r.timerID = r.timerID || this.guid++, e = function() {
                (++o > u && u !== 0 || r.call(n, o) === !1) && jQuery.timer.remove(n, i, r)
            }, e.timerID = r.timerID, f[i][r.timerID] || (f[i][r.timerID] = window.setInterval(e, t)), this.global.push(n))
        },remove: function(n, t, i) {
            var r = jQuery.data(n, this.dataKey), u, i;
            if (r) {
                if (t) {
                    if (r[t]) {
                        if (i)
                            i.timerID && (window.clearInterval(r[t][i.timerID]), delete r[t][i.timerID]);
                        else
                            for (i in r[t])
                                window.clearInterval(r[t][i]), delete r[t][i];
                        for (u in r[t])
                            break;
                        u || (u = null, delete r[t])
                    }
                } else
                    for (t in r)
                        this.remove(n, t, i);
                for (u in r)
                    break;
                u || jQuery.removeData(n, this.dataKey)
            }
        }}}), jQuery(window).bind("unload", function() {
    jQuery.each(jQuery.timer.global, function(n, t) {
        jQuery.timer.remove(t)
    })
}), function() {
    var d = this, pt = d._, c = {}, r = Array.prototype, ft = Object.prototype, at = Function.prototype, a = r.push, t = r.slice, l = r.concat, f = ft.toString, wt = ft.hasOwnProperty, nt = r.forEach, st = r.map, ot = r.reduce, g = r.reduceRight, ut = r.filter, rt = r.every, tt = r.some, e = r.indexOf, et = r.lastIndexOf, lt = Array.isArray, yt = Object.keys, k = at.bind, n = function(t) {
        return t instanceof n ? t : this instanceof n ? (this._wrapped = t, void 0) : new n(t)
    }, i, b, w, s, p, y, o, u, ht, it, h;
    "undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = n), exports._ = n) : d._ = n, n.VERSION = "1.4.4", i = n.each = n.forEach = function(t, i, r) {
        var u, e, f;
        if (null != t)
            if (nt && t.forEach === nt)
                t.forEach(i, r);
            else if (t.length === +t.length) {
                for (u = 0, e = t.length; e > u; u++)
                    if (i.call(r, t[u], u, t) === c)
                        return
            } else
                for (f in t)
                    if (n.has(t, f) && i.call(r, t[f], f, t) === c)
                        return
    }, n.map = n.collect = function(n, t, r) {
        var u = [];
        return null == n ? u : st && n.map === st ? n.map(t, r) : (i(n, function(n, i, f) {
            u[u.length] = t.call(r, n, i, f)
        }), u)
    }, b = "Reduce of empty array with no initial value", n.reduce = n.foldl = n.inject = function(t, r, u, f) {
        var e = arguments.length > 2;
        if (null == t && (t = []), ot && t.reduce === ot)
            return f && (r = n.bind(r, f)), e ? t.reduce(r, u) : t.reduce(r);
        if (i(t, function(n, t, i) {
            e ? u = r.call(f, u, n, t, i) : (u = n, e = !0)
        }), !e)
            throw new TypeError(b);
        return u
    }, n.reduceRight = n.foldr = function(t, r, u, f) {
        var o = arguments.length > 2, e, s;
        if (null == t && (t = []), g && t.reduceRight === g)
            return f && (r = n.bind(r, f)), o ? t.reduceRight(r, u) : t.reduceRight(r);
        if (e = t.length, e !== +e && (s = n.keys(t), e = s.length), i(t, function(n, i, h) {
            i = s ? s[--e] : --e, o ? u = r.call(f, u, t[i], i, h) : (u = t[i], o = !0)
        }), !o)
            throw new TypeError(b);
        return u
    }, n.find = n.detect = function(n, t, i) {
        var r;
        return w(n, function(n, u, f) {
            if (t.call(i, n, u, f))
                return r = n, !0
        }), r
    }, n.filter = n.select = function(n, t, r) {
        var u = [];
        return null == n ? u : ut && n.filter === ut ? n.filter(t, r) : (i(n, function(n, i, f) {
            t.call(r, n, i, f) && (u[u.length] = n)
        }), u)
    }, n.reject = function(t, i, r) {
        return n.filter(t, function(n, t, u) {
            return !i.call(r, n, t, u)
        }, r)
    }, n.every = n.all = function(t, r, u) {
        r || (r = n.identity);
        var f = !0;
        return null == t ? f : rt && t.every === rt ? t.every(r, u) : (i(t, function(n, t, i) {
            if (!(f = f && r.call(u, n, t, i)))
                return c
        }), !!f)
    }, w = n.some = n.any = function(t, r, u) {
        r || (r = n.identity);
        var f = !1;
        return null == t ? f : tt && t.some === tt ? t.some(r, u) : (i(t, function(n, t, i) {
            if (f || (f = r.call(u, n, t, i)))
                return c
        }), !!f)
    }, n.contains = n.include = function(n, t) {
        return null == n ? !1 : e && n.indexOf === e ? n.indexOf(t) != -1 : w(n, function(n) {
            return n === t
        })
    }, n.invoke = function(i, r) {
        var u = t.call(arguments, 2), f = n.isFunction(r);
        return n.map(i, function(n) {
            return (f ? r : n[r]).apply(n, u)
        })
    }, n.pluck = function(t, i) {
        return n.map(t, function(n) {
            return n[i]
        })
    }, n.where = function(t, i, r) {
        return n.isEmpty(i) ? r ? null : [] : n[r ? "find" : "filter"](t, function(n) {
            for (var t in i)
                if (i[t] !== n[t])
                    return !1;
            return !0
        })
    }, n.findWhere = function(t, i) {
        return n.where(t, i, !0)
    }, n.max = function(t, r, u) {
        if (!r && n.isArray(t) && t[0] === +t[0] && 65535 > t.length)
            return Math.max.apply(Math, t);
        if (!r && n.isEmpty(t))
            return -1 / 0;
        var f = {computed: -1 / 0,value: -1 / 0};
        return i(t, function(n, t, i) {
            var e = r ? r.call(u, n, t, i) : n;
            e >= f.computed && (f = {value: n,computed: e})
        }), f.value
    }, n.min = function(t, r, u) {
        if (!r && n.isArray(t) && t[0] === +t[0] && 65535 > t.length)
            return Math.min.apply(Math, t);
        if (!r && n.isEmpty(t))
            return 1 / 0;
        var f = {computed: 1 / 0,value: 1 / 0};
        return i(t, function(n, t, i) {
            var e = r ? r.call(u, n, t, i) : n;
            f.computed > e && (f = {value: n,computed: e})
        }), f.value
    }, n.shuffle = function(t) {
        var u, f = 0, r = [];
        return i(t, function(t) {
            u = n.random(f++), r[f - 1] = r[u], r[u] = t
        }), r
    }, s = function(t) {
        return n.isFunction(t) ? t : function(n) {
            return n[t]
        }
    }, n.sortBy = function(t, i, r) {
        var u = s(i);
        return n.pluck(n.map(t, function(n, t, i) {
            return {value: n,index: t,criteria: u.call(r, n, t, i)}
        }).sort(function(n, t) {
            var i = n.criteria, r = t.criteria;
            if (i !== r) {
                if (i > r || i === void 0)
                    return 1;
                if (r > i || r === void 0)
                    return -1
            }
            return n.index < t.index ? -1 : 1
        }), "value")
    }, p = function(t, r, u, f) {
        var e = {}, o = s(r || n.identity);
        return i(t, function(n, i) {
            var r = o.call(u, n, i, t);
            f(e, r, n)
        }), e
    }, n.groupBy = function(t, i, r) {
        return p(t, i, r, function(t, i, r) {
            (n.has(t, i) ? t[i] : t[i] = []).push(r)
        })
    }, n.countBy = function(t, i, r) {
        return p(t, i, r, function(t, i) {
            n.has(t, i) || (t[i] = 0), t[i]++
        })
    }, n.sortedIndex = function(t, i, r, u) {
        var e;
        r = null == r ? n.identity : s(r);
        for (var h = r.call(u, i), f = 0, o = t.length; o > f; )
            e = f + o >>> 1, h > r.call(u, t[e]) ? f = e + 1 : o = e;
        return f
    }, n.toArray = function(i) {
        return i ? n.isArray(i) ? t.call(i) : i.length === +i.length ? n.map(i, n.identity) : n.values(i) : []
    }, n.size = function(t) {
        return null == t ? 0 : t.length === +t.length ? t.length : n.keys(t).length
    }, n.first = n.head = n.take = function(n, i, r) {
        if (null != n)
            return null == i || r ? n[0] : t.call(n, 0, i)
    }, n.initial = function(n, i, r) {
        return t.call(n, 0, n.length - (null == i || r ? 1 : i))
    }, n.last = function(n, i, r) {
        if (null != n)
            return null == i || r ? n[n.length - 1] : t.call(n, Math.max(n.length - i, 0))
    }, n.rest = n.tail = n.drop = function(n, i, r) {
        return t.call(n, null == i || r ? 1 : i)
    }, n.compact = function(t) {
        return n.filter(t, n.identity)
    }, y = function(t, r, u) {
        return i(t, function(t) {
            n.isArray(t) ? r ? a.apply(u, t) : y(t, r, u) : u.push(t)
        }), u
    }, n.flatten = function(n, t) {
        return y(n, t, [])
    }, n.without = function(i) {
        return n.difference(i, t.call(arguments, 1))
    }, n.uniq = n.unique = function(t, r, u, f) {
        n.isFunction(r) && (f = u, u = r, r = !1);
        var s = u ? n.map(t, u, f) : t, o = [], e = [];
        return i(s, function(i, u) {
            (r ? u && e[e.length - 1] === i : n.contains(e, i)) || (e.push(i), o.push(t[u]))
        }), o
    }, n.union = function() {
        return n.uniq(l.apply(r, arguments))
    }, n.intersection = function(i) {
        var r = t.call(arguments, 1);
        return n.filter(n.uniq(i), function(t) {
            return n.every(r, function(i) {
                return n.indexOf(i, t) >= 0
            })
        })
    }, n.difference = function(i) {
        var u = l.apply(r, t.call(arguments, 1));
        return n.filter(i, function(t) {
            return !n.contains(u, t)
        })
    }, n.zip = function() {
        for (var r = t.call(arguments), u = n.max(n.pluck(r, "length")), f = Array(u), i = 0; u > i; i++)
            f[i] = n.pluck(r, "" + i);
        return f
    }, n.object = function(n, t) {
        if (null == n)
            return {};
        for (var r = {}, i = 0, u = n.length; u > i; i++)
            t ? r[n[i]] = t[i] : r[n[i][0]] = n[i][1];
        return r
    }, n.indexOf = function(t, i, r) {
        if (null == t)
            return -1;
        var u = 0, f = t.length;
        if (r) {
            if ("number" != typeof r)
                return u = n.sortedIndex(t, i), t[u] === i ? u : -1;
            u = 0 > r ? Math.max(0, f + r) : r
        }
        if (e && t.indexOf === e)
            return t.indexOf(i, r);
        for (; f > u; u++)
            if (t[u] === i)
                return u;
        return -1
    }, n.lastIndexOf = function(n, t, i) {
        var u, r;
        if (null == n)
            return -1;
        if (u = null != i, et && n.lastIndexOf === et)
            return u ? n.lastIndexOf(t, i) : n.lastIndexOf(t);
        for (r = u ? i : n.length; r--; )
            if (n[r] === t)
                return r;
        return -1
    }, n.range = function(n, t, i) {
        1 >= arguments.length && (t = n || 0, n = 0), i = arguments[2] || 1;
        for (var r = Math.max(Math.ceil((t - n) / i), 0), u = 0, f = Array(r); r > u; )
            f[u++] = n, n += i;
        return f
    }, n.bind = function(n, i) {
        if (n.bind === k && k)
            return k.apply(n, t.call(arguments, 1));
        var r = t.call(arguments, 2);
        return function() {
            return n.apply(i, r.concat(t.call(arguments)))
        }
    }, n.partial = function(n) {
        var i = t.call(arguments, 1);
        return function() {
            return n.apply(this, i.concat(t.call(arguments)))
        }
    }, n.bindAll = function(r) {
        var u = t.call(arguments, 1);
        return 0 === u.length && (u = n.functions(r)), i(u, function(t) {
            r[t] = n.bind(r[t], r)
        }), r
    }, n.memoize = function(t, i) {
        var r = {};
        return i || (i = n.identity), function() {
            var u = i.apply(this, arguments);
            return n.has(r, u) ? r[u] : r[u] = t.apply(this, arguments)
        }
    }, n.delay = function(n, i) {
        var r = t.call(arguments, 2);
        return setTimeout(function() {
            return n.apply(null, r)
        }, i)
    }, n.defer = function(i) {
        return n.delay.apply(n, [i, 1].concat(t.call(arguments, 1)))
    }, n.throttle = function(n, t) {
        var r, u, i, f, e = 0, o = function() {
            e = new Date, i = null, f = n.apply(r, u)
        };
        return function() {
            var s = new Date, h = t - (s - e);
            return r = this, u = arguments, 0 >= h ? (clearTimeout(i), i = null, e = s, f = n.apply(r, u)) : i || (i = setTimeout(o, h)), f
        }
    }, n.debounce = function(n, t, i) {
        var r, u;
        return function() {
            var f = this, e = arguments, o = function() {
                r = null, i || (u = n.apply(f, e))
            }, s = i && !r;
            return clearTimeout(r), r = setTimeout(o, t), s && (u = n.apply(f, e)), u
        }
    }, n.once = function(n) {
        var t, i = !1;
        return function() {
            return i ? t : (i = !0, t = n.apply(this, arguments), n = null, t)
        }
    }, n.wrap = function(n, t) {
        return function() {
            var i = [n];
            return a.apply(i, arguments), t.apply(this, i)
        }
    }, n.compose = function() {
        var n = arguments;
        return function() {
            for (var t = arguments, i = n.length - 1; i >= 0; i--)
                t = [n[i].apply(this, t)];
            return t[0]
        }
    }, n.after = function(n, t) {
        return 0 >= n ? t() : function() {
            if (1 > --n)
                return t.apply(this, arguments)
        }
    }, n.keys = yt || function(t) {
        var i, r;
        if (t !== Object(t))
            throw new TypeError("Invalid object");
        i = [];
        for (r in t)
            n.has(t, r) && (i[i.length] = r);
        return i
    }, n.values = function(t) {
        var r = [], i;
        for (i in t)
            n.has(t, i) && r.push(t[i]);
        return r
    }, n.pairs = function(t) {
        var r = [], i;
        for (i in t)
            n.has(t, i) && r.push([i, t[i]]);
        return r
    }, n.invert = function(t) {
        var r = {}, i;
        for (i in t)
            n.has(t, i) && (r[t[i]] = i);
        return r
    }, n.functions = n.methods = function(t) {
        var r = [], i;
        for (i in t)
            n.isFunction(t[i]) && r.push(i);
        return r.sort()
    }, n.extend = function(n) {
        return i(t.call(arguments, 1), function(t) {
            if (t)
                for (var i in t)
                    n[i] = t[i]
        }), n
    }, n.pick = function(n) {
        var u = {}, f = l.apply(r, t.call(arguments, 1));
        return i(f, function(t) {
            t in n && (u[t] = n[t])
        }), u
    }, n.omit = function(i) {
        var f = {}, e = l.apply(r, t.call(arguments, 1)), u;
        for (u in i)
            n.contains(e, u) || (f[u] = i[u]);
        return f
    }, n.defaults = function(n) {
        return i(t.call(arguments, 1), function(t) {
            if (t)
                for (var i in t)
                    null == n[i] && (n[i] = t[i])
        }), n
    }, n.clone = function(t) {
        return n.isObject(t) ? n.isArray(t) ? t.slice() : n.extend({}, t) : t
    }, n.tap = function(n, t) {
        return t(n), n
    }, o = function(t, i, r, u) {
        var a, v, e, s, c, l, h;
        if (t === i)
            return 0 !== t || 1 / t == 1 / i;
        if (null == t || null == i)
            return t === i;
        if (t instanceof n && (t = t._wrapped), i instanceof n && (i = i._wrapped), a = f.call(t), a != f.call(i))
            return !1;
        switch (a) {
            case "[object String]":
                return t == i + "";
            case "[object Number]":
                return t != +t ? i != +i : 0 == t ? 1 / t == 1 / i : t == +i;
            case "[object Date]":
            case "[object Boolean]":
                return +t == +i;
            case "[object RegExp]":
                return t.source == i.source && t.global == i.global && t.multiline == i.multiline && t.ignoreCase == i.ignoreCase
        }
        if ("object" != typeof t || "object" != typeof i)
            return !1;
        for (v = r.length; v--; )
            if (r[v] == t)
                return u[v] == i;
        if (r.push(t), u.push(i), e = 0, s = !0, "[object Array]" == a) {
            if (e = t.length, s = e == i.length)
                for (; e-- && (s = o(t[e], i[e], r, u)); )
                    ;
        } else {
            if (c = t.constructor, l = i.constructor, c !== l && !(n.isFunction(c) && c instanceof c && n.isFunction(l) && l instanceof l))
                return !1;
            for (h in t)
                if (n.has(t, h) && (e++, !(s = n.has(i, h) && o(t[h], i[h], r, u))))
                    break;
            if (s) {
                for (h in i)
                    if (n.has(i, h) && !e--)
                        break;
                s = !e
            }
        }
        return r.pop(), u.pop(), s
    }, n.isEqual = function(n, t) {
        return o(n, t, [], [])
    }, n.isEmpty = function(t) {
        if (null == t)
            return !0;
        if (n.isArray(t) || n.isString(t))
            return 0 === t.length;
        for (var i in t)
            if (n.has(t, i))
                return !1;
        return !0
    }, n.isElement = function(n) {
        return !(!n || 1 !== n.nodeType)
    }, n.isArray = lt || function(n) {
        return "[object Array]" == f.call(n)
    }, n.isObject = function(n) {
        return n === Object(n)
    }, i(["Arguments", "Function", "String", "Number", "Date", "RegExp"], function(t) {
        n["is" + t] = function(n) {
            return f.call(n) == "[object " + t + "]"
        }
    }), n.isArguments(arguments) || (n.isArguments = function(t) {
        return !(!t || !n.has(t, "callee"))
    }), "function" != typeof /./ && (n.isFunction = function(n) {
        return "function" == typeof n
    }), n.isFinite = function(n) {
        return isFinite(n) && !isNaN(parseFloat(n))
    }, n.isNaN = function(t) {
        return n.isNumber(t) && t != +t
    }, n.isBoolean = function(n) {
        return n === !0 || n === !1 || "[object Boolean]" == f.call(n)
    }, n.isNull = function(n) {
        return null === n
    }, n.isUndefined = function(n) {
        return n === void 0
    }, n.has = function(n, t) {
        return wt.call(n, t)
    }, n.noConflict = function() {
        return d._ = pt, this
    }, n.identity = function(n) {
        return n
    }, n.times = function(n, t, i) {
        for (var u = Array(n), r = 0; n > r; r++)
            u[r] = t.call(i, r);
        return u
    }, n.random = function(n, t) {
        return null == t && (t = n, n = 0), n + Math.floor(Math.random() * (t - n + 1))
    }, u = {escape: {"&": "&amp;","<": "&lt;",">": "&gt;",'"': "&quot;","'": "&#x27;","/": "&#x2F;"}}, u.unescape = n.invert(u.escape), ht = {escape: RegExp("[" + n.keys(u.escape).join("") + "]", "g"),unescape: RegExp("(" + n.keys(u.unescape).join("|") + ")", "g")}, n.each(["escape", "unescape"], function(t) {
        n[t] = function(n) {
            return null == n ? "" : ("" + n).replace(ht[t], function(n) {
                return u[t][n]
            })
        }
    }), n.result = function(t, i) {
        if (null == t)
            return null;
        var r = t[i];
        return n.isFunction(r) ? r.call(t) : r
    }, n.mixin = function(t) {
        i(n.functions(t), function(i) {
            var r = n[i] = t[i];
            n.prototype[i] = function() {
                var t = [this._wrapped];
                return a.apply(t, arguments), h.call(this, r.apply(n, t))
            }
        })
    }, it = 0, n.uniqueId = function(n) {
        var t = ++it + "";
        return n ? n + t : t
    }, n.templateSettings = {evaluate: /<%([\s\S]+?)%>/g,interpolate: /<%=([\s\S]+?)%>/g,escape: /<%-([\s\S]+?)%>/g};
    var v = /(.)^/, ct = {"'": "'","\\": "\\","\r": "r","\n": "n","\t": "t","\u2028": "u2028","\u2029": "u2029"}, vt = /\\|'|\r|\n|\t|\u2028|\u2029/g;
    n.template = function(t, i, r) {
        var f, e;
        r = n.defaults({}, r, n.templateSettings);
        var s = RegExp([(r.escape || v).source, (r.interpolate || v).source, (r.evaluate || v).source].join("|") + "|$", "g"), o = 0, u = "__p+='";
        t.replace(s, function(n, i, r, f, e) {
            return u += t.slice(o, e).replace(vt, function(n) {
                return "\\" + ct[n]
            }), i && (u += "'+\n((__t=(" + i + "))==null?'':_.escape(__t))+\n'"), r && (u += "'+\n((__t=(" + r + "))==null?'':__t)+\n'"), f && (u += "';\n" + f + "\n__p+='"), o = e + n.length, n
        }), u += "';\n", r.variable || (u = "with(obj||{}){\n" + u + "}\n"), u = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + u + "return __p;\n";
        try {
            f = Function(r.variable || "obj", "_", u)
        } catch (h) {
            throw h.source = u, h;
        }
        return i ? f(i, n) : (e = function(t) {
            return f.call(this, t, n)
        }, e.source = "function(" + (r.variable || "obj") + "){\n" + u + "}", e)
    }, n.chain = function(t) {
        return n(t).chain()
    }, h = function(t) {
        return this._chain ? n(t).chain() : t
    }, n.mixin(n), i(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function(t) {
        var i = r[t];
        n.prototype[t] = function() {
            var n = this._wrapped;
            return i.apply(n, arguments), "shift" != t && "splice" != t || 0 !== n.length || delete n[0], h.call(this, n)
        }
    }), i(["concat", "join", "slice"], function(t) {
        var i = r[t];
        n.prototype[t] = function() {
            return h.call(this, i.apply(this._wrapped, arguments))
        }
    }), n.extend(n.prototype, {chain: function() {
            return this._chain = !0, this
        },value: function() {
            return this._wrapped
        }})
}.call(this), function(n) {
    function h(n) {
        return typeof n == "string"
    }
    function e(n) {
        var t = st.call(arguments, 1);
        return function() {
            return n.apply(this, t.concat(st.call(arguments)))
        }
    }
    function at(n) {
        return n.replace(l, "$2")
    }
    function vt(n) {
        return n.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/, "$1")
    }
    function d(t, u, e, s, c) {
        var b, y, p, k, d;
        return s !== i ? (p = e.match(t ? l : /^([^#?]*)\??([^#]*)(#?.*)/), d = p[3] || "", c === 2 && h(s) ? y = s.replace(t ? a : ht, "") : (k = r(p[2]), s = h(s) ? r[t ? f : o](s) : s, y = c === 2 ? s : c === 1 ? n.extend({}, s, k) : n.extend({}, k, s), y = tt(y), t && (y = y.replace(nt, v))), b = p[1] + (t ? w : y || !p[1] ? "?" : "") + y + d) : b = u(e !== i ? e : location.href), b
    }
    function it(n, t, u) {
        return t === i || typeof t == "boolean" ? (u = t, t = s[n ? f : o]()) : t = h(t) ? t.replace(n ? a : ht, "") : t, r(t, u)
    }
    function ct(t, r, u, f) {
        return h(u) || typeof u == "object" || (f = u, u = r, r = i), this.each(function() {
            var e = n(this), i = r || ft()[(this.nodeName || "").toLowerCase()] || "", o = i && e.attr(i) || "";
            e.attr(i, s[t](o, u, f))
        })
    }
    var i, st = Array.prototype.slice, v = decodeURIComponent, s = n.param, tt, u, r, y, p = n.bbq = n.bbq || {}, ot, et, ft, ut = n.event.special, rt = "hashchange", o = "querystring", f = "fragment", b = "elemUrlAttr", k = "href", c = "src", ht = /^.*\?|#.*$/g, a, l, nt, g, w, lt = {};
    s[o] = e(d, 0, vt), s[f] = u = e(d, 1, at), s.sorted = tt = function(t, i) {
        var u = [], r = {};
        return n.each(s(t, i).split("&"), function(n, t) {
            var i = t.replace(/(?:%5B|=).*$/, ""), f = r[i];
            f || (f = r[i] = [], u.push(i)), f.push(t)
        }), n.map(u.sort(), function(n) {
            return r[n]
        }).join("&")
    }, u.noEscape = function(t) {
        t = t || "";
        var i = n.map(t.split(""), encodeURIComponent);
        nt = new RegExp(i.join("|"), "g")
    }, u.noEscape(",/"), u.ajaxCrawlable = function(n) {
        return n !== i && (n ? (a = /^.*(?:#!|#)/, l = /^([^#]*)(?:#!|#)?(.*)$/, w = "#!") : (a = /^.*#/, l = /^([^#]*)#?(.*)$/, w = "#"), g = !!n), g
    }, u.ajaxCrawlable(0), n.deparam = r = function(t, r) {
        var u = {}, f = {"true": !0,"false": !1,"null": null};
        return n.each(t.replace(/\+/g, " ").split("&"), function(t, e) {
            var y = e.split("="), h = v(y[0]), o, a = u, l = 0, s = h.split("]["), c = s.length - 1;
            if (/\[/.test(s[0]) && /\]$/.test(s[c]) ? (s[c] = s[c].replace(/\]$/, ""), s = s.shift().split("[").concat(s), c = s.length - 1) : c = 0, y.length === 2)
                if (o = v(y[1]), r && (o = o && !isNaN(o) ? +o : o === "undefined" ? i : f[o] !== i ? f[o] : o), c)
                    for (; l <= c; l++)
                        h = s[l] === "" ? a.length : s[l], a = a[h] = l < c ? a[h] || (s[l + 1] && isNaN(s[l + 1]) ? {} : []) : o;
                else
                    n.isArray(u[h]) ? u[h].push(o) : u[h] = u[h] !== i ? [u[h], o] : o;
            else
                h && (u[h] = r ? i : "")
        }), u
    }, r[o] = e(it, 0), r[f] = y = e(it, 1), n[b] || (n[b] = function(t) {
        return n.extend(lt, t)
    })({a: k,base: k,iframe: c,img: c,input: c,form: "action",link: k,script: c}), ft = n[b], n.fn[o] = e(ct, o), n.fn[f] = e(ct, f), p.pushState = ot = function(n, t) {
        h(n) && /^#/.test(n) && t === i && (t = 2);
        var r = n !== i, f = u(location.href, r ? n : {}, r ? t : 2);
        location.href = f
    }, p.getState = et = function(n, t) {
        return n === i || typeof n == "boolean" ? y(n) : y(t)[n]
    }, p.removeState = function(t) {
        var r = {};
        t !== i && (r = et(), n.each(n.isArray(t) ? t : arguments, function(n, t) {
            delete r[t]
        })), ot(r, 2)
    }, ut[rt] = n.extend(ut[rt], {add: function(t) {
            function o(n) {
                var t = n[f] = u();
                n.getState = function(n, u) {
                    return n === i || typeof n == "boolean" ? r(t, n) : r(t, u)[n]
                }, e.apply(this, arguments)
            }
            var e;
            if (n.isFunction(t))
                return e = t, o;
            e = t.handler, t.handler = o
        }})
}(jQuery, this), function(n, t, i) {
    function u(n) {
        return n = n || location.href, "#" + n.replace(/^[^#]*#?(.*)$/, "$1")
    }
    var r = "hashchange", f = document, e, s = n.event.special, h = f.documentMode, o = "on" + r in t && (h === i || h > 7);
    n.fn[r] = function(n) {
        return n ? this.bind(r, n) : this.trigger(r)
    }, n.fn[r].delay = 50, s[r] = n.extend(s[r], {setup: function() {
            if (o)
                return !1;
            n(e.start)
        },teardown: function() {
            if (o)
                return !1;
            n(e.stop)
        }}), e = function() {
        function a() {
            var f = u(), i = v(h);
            f !== h ? (l(h = f, i), n(t).trigger(r)) : i !== h && (location.href = location.href.replace(/#.*/, "") + i), s = setTimeout(a, n.fn[r].delay)
        }
        var e = {}, s, h = u(), c = function(n) {
            return n
        }, l = c, v = c;
        return e.start = function() {
            s || a()
        }, e.stop = function() {
            s && clearTimeout(s), s = i
        }, n.browser.msie && !o && function() {
            var t, i;
            e.start = function() {
                t || (i = n.fn[r].src, i = i && i + u(), t = n('<iframe tabindex="-1" title="empty"/>').hide().one("load", function() {
                    i || l(u()), a()
                }).attr("src", i || "javascript:0").insertAfter("body")[0].contentWindow, f.onpropertychange = function() {
                    try {
                        event.propertyName === "title" && (t.document.title = f.title)
                    } catch (n) {
                    }
                })
            }, e.stop = c, v = function() {
                return u(t.location.href)
            }, l = function(i, u) {
                var e = t.document, o = n.fn[r].domain;
                i !== u && (e.title = f.title, e.open(), o && e.write('<script>document.domain="' + o + '"<\/script>'), e.close(), t.location.hash = i)
            }
        }(), e
    }()
}(jQuery, this), function(n) {
    n.fn.zclip = function(t) {
        if (typeof t != "object" || t.length) {
            if (typeof t == "string")
                return this.each(function() {
                    var r = n(this), u, i;
                    t = t.toLowerCase(), u = r.data("zclipId"), i = n("#" + u + ".zclip"), t == "remove" ? (i.remove(), r.removeClass("active hover")) : t == "hide" ? (i.hide(), r.removeClass("active hover")) : t == "show" && i.show()
                })
        } else {
            var i = n.extend({path: "ZeroClipboard.swf",copy: null,beforeCopy: null,afterCopy: null,clickAfter: !0,setHandCursor: !0,setCSSEffects: !0}, t);
            return this.each(function() {
                var t = n(this), r;
                t.is(":visible") && (typeof i.copy == "string" || n.isFunction(i.copy)) && (ZeroClipboard.setMoviePath(i.path), r = new ZeroClipboard.Client, n.isFunction(i.copy) && t.bind("zClip_copy", i.copy), n.isFunction(i.beforeCopy) && t.bind("zClip_beforeCopy", i.beforeCopy), n.isFunction(i.afterCopy) && t.bind("zClip_afterCopy", i.afterCopy), r.setHandCursor(i.setHandCursor), r.setCSSEffects(i.setCSSEffects), r.addEventListener("mouseOver", function() {
                    t.trigger("mouseenter")
                }), r.addEventListener("mouseOut", function() {
                    t.trigger("mouseleave")
                }), r.addEventListener("mouseDown", function() {
                    t.trigger("mousedown"), n.isFunction(i.copy) ? r.setText(t.triggerHandler("zClip_copy")) : r.setText(i.copy), n.isFunction(i.beforeCopy) && t.trigger("zClip_beforeCopy")
                }), r.addEventListener("complete", function(r, u) {
                    n.isFunction(i.afterCopy) ? t.trigger("zClip_afterCopy") : (u.length > 500 && (u = u.substr(0, 500) + "...\n\n(" + (u.length - 500) + " characters not shown)"), t.removeClass("hover"), alert("Copied text to clipboard:\n\n " + u)), i.clickAfter && t.trigger("click")
                }), r.glue(t[0], t.parent()[0]), n(window).bind("load resize", function() {
                    r.reposition()
                }))
            })
        }
    }
}(jQuery), ZeroClipboard = {version: "1.0.7",clients: {},moviePath: "ZeroClipboard.swf",nextId: 1,$: function(n) {
        return typeof n == "string" && (n = document.getElementById(n)), n.addClass || (n.hide = function() {
            this.style.display = "none"
        }, n.show = function() {
            this.style.display = ""
        }, n.addClass = function(n) {
            this.removeClass(n), this.className += " " + n
        }, n.removeClass = function(n) {
            for (var i = this.className.split(/\s+/), r = -1, t = 0; t < i.length; t++)
                i[t] == n && (r = t, t = i.length);
            return r > -1 && (i.splice(r, 1), this.className = i.join(" ")), this
        }, n.hasClass = function(n) {
            return !!this.className.match(new RegExp("\\s*" + n + "\\s*"))
        }), n
    },setMoviePath: function(n) {
        this.moviePath = n
    },dispatch: function(n, t, i) {
        var r = this.clients[n];
        r && r.receiveEvent(t, i)
    },register: function(n, t) {
        this.clients[n] = t
    },getDOMObjectPosition: function(n, t) {
        var i = {left: 0,top: 0,width: n.width ? n.width : n.offsetWidth,height: n.height ? n.height : n.offsetHeight};
        return n && n != t && (i.left += n.offsetLeft, i.top += n.offsetTop), i
    },Client: function(n) {
        this.handlers = {}, this.id = ZeroClipboard.nextId++, this.movieId = "ZeroClipboardMovie_" + this.id, ZeroClipboard.register(this.id, this), n && this.glue(n)
    }}, ZeroClipboard.Client.prototype = {id: 0,ready: !1,movie: null,clipText: "",handCursorEnabled: !0,cssEffects: !0,handlers: null,glue: function(n, t, i) {
        var f, u, r;
        if (this.domElement = ZeroClipboard.$(n), f = 99, this.domElement.style.zIndex && (f = parseInt(this.domElement.style.zIndex, 10) + 1), typeof t == "string" ? t = ZeroClipboard.$(t) : typeof t == "undefined" && (t = document.getElementsByTagName("body")[0]), u = ZeroClipboard.getDOMObjectPosition(this.domElement, t), this.div = document.createElement("div"), this.div.className = "zclip", this.div.id = "zclip-" + this.movieId, $(this.domElement).data("zclipId", "zclip-" + this.movieId), r = this.div.style, r.position = "absolute", r.left = "" + u.left + "px", r.top = "" + u.top + "px", r.width = "" + u.width + "px", r.height = "" + u.height + "px", r.zIndex = f, typeof i == "object")
            for (addedStyle in i)
                r[addedStyle] = i[addedStyle];
        t.appendChild(this.div), this.div.innerHTML = this.getHTML(u.width, u.height)
    },getHTML: function(n, t) {
        var i = "", r = "id=" + this.id + "&width=" + n + "&height=" + t, u;
        return navigator.userAgent.match(/MSIE/) ? (u = location.href.match(/^https/i) ? "https://" : "http://", i += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + u + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + n + '" height="' + t + '" id="' + this.movieId + '" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="' + ZeroClipboard.moviePath + '" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="' + r + '"/><param name="wmode" value="transparent"/></object>') : i += '<embed id="' + this.movieId + '" src="' + ZeroClipboard.moviePath + '" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="' + n + '" height="' + t + '" name="' + this.movieId + '" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="' + r + '" wmode="transparent" />', i
    },hide: function() {
        this.div && (this.div.style.left = "-2000px")
    },show: function() {
        this.reposition()
    },destroy: function() {
        if (this.domElement && this.div) {
            this.hide(), this.div.innerHTML = "";
            var n = document.getElementsByTagName("body")[0];
            try {
                n.removeChild(this.div)
            } catch (t) {
            }
            this.domElement = null, this.div = null
        }
    },reposition: function(n) {
        if (n && (this.domElement = ZeroClipboard.$(n), this.domElement || this.hide()), this.domElement && this.div) {
            var t = ZeroClipboard.getDOMObjectPosition(this.domElement), i = this.div.style;
            i.left = "" + t.left + "px", i.top = "" + t.top + "px"
        }
    },setText: function(n) {
        this.clipText = n, this.ready && this.movie.setText(n)
    },addEventListener: function(n, t) {
        n = n.toString().toLowerCase().replace(/^on/, ""), this.handlers[n] || (this.handlers[n] = []), this.handlers[n].push(t)
    },setHandCursor: function(n) {
        this.handCursorEnabled = n, this.ready && this.movie.setHandCursor(n)
    },setCSSEffects: function(n) {
        this.cssEffects = !!n
    },receiveEvent: function(n, t) {
        var r, u, f, i;
        n = n.toString().toLowerCase().replace(/^on/, "");
        switch (n) {
            case "load":
                if (this.movie = document.getElementById(this.movieId), !this.movie) {
                    r = this, setTimeout(function() {
                        r.receiveEvent("load", null)
                    }, 1);
                    return
                }
                if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) {
                    r = this, setTimeout(function() {
                        r.receiveEvent("load", null)
                    }, 100), this.ready = !0;
                    return
                }
                this.ready = !0;
                try {
                    this.movie.setText(this.clipText)
                } catch (e) {
                }
                try {
                    this.movie.setHandCursor(this.handCursorEnabled)
                } catch (e) {
                }
                break;
            case "mouseover":
                this.domElement && this.cssEffects && (this.domElement.addClass("hover"), this.recoverActive && this.domElement.addClass("active"));
                break;
            case "mouseout":
                this.domElement && this.cssEffects && (this.recoverActive = !1, this.domElement.hasClass("active") && (this.domElement.removeClass("active"), this.recoverActive = !0), this.domElement.removeClass("hover"));
                break;
            case "mousedown":
                this.domElement && this.cssEffects && this.domElement.addClass("active");
                break;
            case "mouseup":
                this.domElement && this.cssEffects && (this.domElement.removeClass("active"), this.recoverActive = !1)
        }
        if (this.handlers[n])
            for (u = 0, f = this.handlers[n].length; u < f; u++)
                i = this.handlers[n][u], typeof i == "function" ? i(this, t) : typeof i == "object" && i.length == 2 ? i[0][i[1]](this, t) : typeof i == "string" && window[i](this, t)
    }}, function(n) {
    typeof define == "function" && define.amd ? define(["jquery"], n) : n(jQuery)
}(function(n) {
    function u(n) {
        return n
    }
    function f(n) {
        return decodeURIComponent(n.replace(r, " "))
    }
    function i(n) {
        n.indexOf('"') === 0 && (n = n.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\"));
        try {
            return t.json ? JSON.parse(n) : n
        } catch (i) {
        }
    }
    var r = /\+/g, t = n.cookie = function(r, e, o) {
        var l, h, s, y;
        if (e !== undefined)
            return o = n.extend({}, t.defaults, o), typeof o.expires == "number" && (l = o.expires, h = o.expires = new Date, h.setDate(h.getDate() + l)), e = t.json ? JSON.stringify(e) : String(e), document.cookie = [t.raw ? r : encodeURIComponent(r), "=", t.raw ? e : encodeURIComponent(e), o.expires ? "; expires=" + o.expires.toUTCString() : "", o.path ? "; path=" + o.path : "", o.domain ? "; domain=" + o.domain : "", o.secure ? "; secure" : ""].join("");
        var a = t.raw ? u : f, v = document.cookie.split("; "), c = r ? undefined : {};
        for (s = 0, y = v.length; s < y; s++) {
            var p = v[s].split("="), w = a(p.shift()), b = a(p.join("="));
            if (r && r === w) {
                c = i(b);
                break
            }
            r || (c[w] = i(b))
        }
        return c
    };
    t.defaults = {}, n.removeCookie = function(t, i) {
        return n.cookie(t) !== undefined ? (n.cookie(t, "", n.extend({}, i, {expires: -1})), !0) : !1
    }
}), function(n) {
    n.activity = function() {
        var i = n("#activity-handle"), t = "#activity";
        $activity = n(t), $scrollCont = $activity.find(".dialog_body:first"), $activeList = n("#activity-base"), $activeItem = $activeList.find(".item"), $activeImage = $activeItem.find(".ali-image"), closedName = "ali-closed";
        i.on({click: function(i) {
                i.preventDefault(), n.dialogCont({contName: t})
            }})
    }, n.noticeBase = function() {
        function h(i) {
            var r = n("#nbi-" + i), e, s, u, f;
            r && (e = r.find(".nbi-header"), s = r.find(".nbi-content"), r.siblings(n("." + t)).removeClass(t), r.addClass(t), u = r.position(), f = parseInt(u.top - 20), o.stop(!0, !1).animate({scrollTop: f + "px"}, 600))
        }
        var i = n("#notice"), f = i.find("li a"), e = "#notice-dialog", r = null, u = n("#notice-base"), o = u.parent(), s = u.children(), t = "active";
        i.notice({heightSet: 24});
        f.on({click: function(t) {
                return t.preventDefault(), r = n(this).attr("data-id"), n.dialogCont({contName: e}), h(r), !1
            }});
        n.each(s, function() {
            var i = n(this), r = i.find(".nbi-header"), u = i.children(n(".nbi-content"));
            r.on({click: function(r) {
                    r.preventDefault(), i.siblings(n("." + t)).removeClass(t), i.toggleClass(t)
                }})
        })
    }, n.frameResize = function() {
        function t() {
            var r = n(window).width(), i = n(window).height(), t = i - (77 + n(".content_footer:first").outerHeight()) - 40;
            n("#content").css({height: t + "px"}), n(".content_body:first").css({height: t - 20 + "px"})
        }
        t(), n(window).resize(function() {
            t()
        })
    }, n.btItemCutdown = function(t, i) {
        function o() {
            t == 1 ? (clearInterval(e), i()) : (t = t - 1, f = parseInt(t / 3600 % 24), f = f < 10 ? "0" + f : f, r = parseInt(t / 60 % 60), r = r < 10 ? "0" + r : r, u = parseInt(t % 60), u = u < 10 ? "0" + u : u, n("#bt_item_cutdown .bt_item_cutdown_timer:first").html("<span>" + r + "<span><span>:</span><span>" + u + "</span>"))
        }
        var f = 0, r = 0, u = 0, e = null;
        e = setInterval(function() {
            o()
        }, 1e3)
    }, n.fn.cutTimeDown = function(t) {
        var i = {endTime: 0}, r = n.extend({}, i, t);
        return this.each(function() {
            var t = r.endTime, n = !1;
            return typeof t != "number" ? (alert("计时参数必须为数字！"), !1) : n = !0
        })
    }, n.fn.mClock = function() {
        return this.each(function() {
            var e = n(this), t = new Date, o = "", r = "", s = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], h = t.getFullYear(), c = t.getMonth() + 1 < 10 ? "0" + (t.getMonth() + 1) : t.getMonth() + 1, l = t.getDate() < 10 ? "0" + t.getDate() : t.getDate(), a = t.getDay(), v = s[a], i = t.getHours() < 10 ? "0" + t.getHours() : t.getHours(), u = t.getMinutes() < 10 ? "0" + t.getMinutes() : t.getMinutes(), y = t.getSeconds() < 10 ? "0" + t.getSeconds() : t.getSeconds();
            f = i <= 12 ? "上午" : "下午", o = i + ":" + u + ":" + y + " " + f, r = h + "年" + c + "月" + l + "日 " + v, e.html("<li>" + f + "</li><li>" + i + "</li><li>:</li><li>" + u + "<li>").attr("title", r)
        })
    }, n.fn.orderQuery = function(t) {
        if (t.data) {
            var i = {orderId: "data-order-id",ajaxUrl: "",orderInfoInner: function() {
                    for (var i = "", r = t.data, f = "", e = r[0].split("|"), u = 0; u < e.length; u++)
                        f += "<span>" + e[u] + "</span>";
					//console.log(77);
                    i += '<div class="order_info"><table><tbody>', i += '<tr><td class="t_right t_title"><span>投注号码：</span></td><td><div class="order_betting_numbs">' + f + "</div></td>", i += '<td class="t_right t_title"><span>订单ID：</span></td><td><span class="orderInfoOrderId">' + r[1] + "</span></td></tr>", i += '<tr><td class="t_right t_title">发单人：</td><td>' + r[2] + "</td>", i += '<td class="t_right t_title">单注金额：</td><td><span class="base_red">' + r[3] + "</span>元</td></tr>", i += '<tr><td class="t_right t_title">彩种：</td><td>' + r[4] + "</td>", i += '<td class="t_right t_title">期号：</td><td  class="orderInfoIssueNumber">' + r[5] + "</td></tr>", i += '<tr><td class="t_right t_title">玩法：</td><td>' + r[6] + "</td>", i += '<td class="t_right t_title">开奖号码：</td><td><span class="base_orgen">' + r[7] + "</span></td></tr>", i += '<tr><td class="t_right t_title">投注数量：</td><td>' + r[8] + "</td>", i += '<td class="t_right t_title">投注总额：</td><td><span class="base_green">' + r[9] + "</span>元</td></tr>", i += '<tr><td class="t_right t_title">中奖注数：</td><td><span class="base_green">' + r[10] + "</span></td>", i += '<td class="t_right t_title">中奖金额：</td><td><span class="base_red">' + r[11] + "</span>元</td></tr>", i += '<tr><td class="t_right t_title">奖金/赔率：</td><td>' + r[12] + "</td>", i += '<td class="t_right t_title">返点：</td><td>' + r[13] + "</td></tr>", i += '<tr><td class="t_right t_title">交易时间：</td><td>' + r[14] + "</td>", i += '<td class="t_right t_title">状态：</td><td>' + r[15] + "</td></tr>", i += '<tr><td class="t_right t_title">盈亏：</td><td>' + r[16] + "</td></tr>", i += "</table></tbody>", r[15] == "未开奖" && r[19] != "10" && r[20] == r[21] && (i += '<div class="base_button"><input type="button" value="撤单" class="cancel_order" lotteryIdValue="' + r[18] + '" /></div>'), i += "</div>", n.dialogCont({model: 1,title: "订单详情",bodyInner: i,hideModel: 1})
                },error: "订单信息查询失败或订单不存在！"}, r = n.extend({}, i, t);
            return this.each(function() {
                r.orderInfoInner()
            })
        }
    }, n.bonusSliderFunc = {sliderSet: function(t, i, r, u) {			
            if (i <= 0 || i >= 100)
                return !1;
            i = i.toFixed(2);
            var f = n.bonusSliderFunc.proTopiex(i, r);
            t.find(".slider_handle:first").css({left: f + "px"}), typeof u == "function" && u([i, Math.round(i * 30)])
        },proTopiex: function(n, t) {
            return n / 100 * t - 6
        }}, n.fn.bonusSlider = function(t) {
        var r = {startInt: 0,mainSum: 0,maxSum: 2e3,stepSum: 5,slideWidth: 300,endFunc: "",backFunc: ""}, i = n.extend({}, r, t);
        return this.each(function() {
            var c = n(this), t = i.startInt, r = c.find(".slider_bar:first"), u = i.slideWidth, f, e, o, s, h;
            n.bonusSliderFunc.sliderSet(r, t, u, i.endFunc), typeof backFunc == "function" && backFunc(), f = !1, r.find(".slider_handle:first").bind({mousedown: function(t) {
                    t.preventDefault && t.preventDefault(), f = !0, e = n(this).position(), o = e.left + 6, s = t.pageX - o, r.find(".slider_handle:first").css({cursor: "-webkit-grabbing"})
                },mouseup: function() {
                    f = !1, r.find(".slider_handle:first").css({cursor: "-webkit-grab"})
                }}), n(document).bind({mousemove: function(e) {
                    if (f)
                        h = e.pageX - s, t = h / u * 100, r.find(".slider_handle:first").css({cursor: "-webkit-grabbing"}), n.bonusSliderFunc.sliderSet(r, t, u, i.endFunc);
                    else
                        return !1
                },mouseup: function() {
                    f = !1, r.find(".slider_handle:first").css({cursor: "-webkit-grab"})
                }}), n("#bs_add").bind({click: function() {
                    if (t >= 100)
                        return !1;
                    t = t + i.stepSum, n.bonusSliderFunc.sliderSet(r, t, u, i.endFunc)
                }}), n("#bs_reduce").bind({click: function() {
                    if (t <= 0)
                        return !1;
                    t = t - i.stepSum, n.bonusSliderFunc.sliderSet(r, t, u, i.endFunc)
                }})
        })
    }, n.fn.stepingInput = function(t) {
        var i = {nMinNumb: 0,nMaxNumb: 100,nStartNumb: 0,nStride: 10,sPrefix: "",sSuffix: "",sLockedTag: "locked",sBaseInput: ".sti_base:first",sValueInput: ".sti_value:first",sAddBtn: ".sp_add:first",sReduceBtn: ".sp_reduce:first",fCallFunc: ""};
        return oStepingInput = n.extend({}, i, t), this.each(function() {
            function r(n) {
                var t = parseFloat(n);
                return t.toFixed(2)
            }
            function i(n) {
                var i = "";
                n <= oStepingInput.nMinNumb ? (f.find("span:first").addClass(oStepingInput.sLockedTag), i = r(oStepingInput.nMinNumb)) : n >= oStepingInput.nMaxNumb ? (u.find("span:first").addClass(oStepingInput.sLockedTag), i = r(oStepingInput.nMaxNumb)) : (t.find("span." + oStepingInput.sLockedTag).removeClass(oStepingInput.sLockedTag), i = r(n)), e.val(oStepingInput.sPrefix + i + oStepingInput.sSuffix), o.val(i), typeof oStepingInput.fCallFunc == "function" && oStepingInput.fCallFunc(i)
            }
            var t = n(this);
            oStepingInput.nNowValue = parseFloat(oStepingInput.nStartNumb);
            var u = t.find(oStepingInput.sAddBtn), f = t.find(oStepingInput.sReduceBtn), e = t.find(oStepingInput.sBaseInput), o = t.find(oStepingInput.sValueInput);
            i(oStepingInput.nNowValue), e.bind({blur: function() {
                    oStepingInput.nNowValue = parseFloat(n(this).val()), i(oStepingInput.nNowValue)
                }}), u.bind({click: function() {
                    if (n(this).find("span:first").hasClass(oStepingInput.sLockedTag))
                        return !1;
                    oStepingInput.nNowValue = oStepingInput.nNowValue + oStepingInput.nStride, i(oStepingInput.nNowValue)
                }}), f.bind({click: function() {
                    if (n(this).find("span:first").hasClass(oStepingInput.sLockedTag))
                        return !1;
                    oStepingInput.nNowValue = oStepingInput.nNowValue - oStepingInput.nStride, i(oStepingInput.nNowValue)
                }})
        })
    }, n.fn.stepingNotInput = function(t) {
        var i = {nMinNumb: 0,nMaxNumb: 100,nStartNumb: 0,nStride: 10,sPrefix: "",sSuffix: "",sLockedTag: "locked",sBaseInput: ".sti_not_base:first",sValueInput: ".sti_not_value:first",sAddBtn: ".sp_add:first",sReduceBtn: ".sp_reduce:first",fCallFunc: ""};
        return oStepingNotInput = n.extend({}, i, t), this.each(function() {
            function r(n) {
                var t = parseFloat(n);
                return t.toFixed(2)
            }
            function i(n) {
                var i = "";
                n <= oStepingNotInput.nMinNumb ? (f.find("span:first").addClass(oStepingNotInput.sLockedTag), i = r(oStepingNotInput.nMinNumb)) : n >= oStepingNotInput.nMaxNumb ? (u.find("span:first").addClass(oStepingNotInput.sLockedTag), i = r(oStepingNotInput.nMaxNumb)) : (t.find("span." + oStepingNotInput.sLockedTag).removeClass(oStepingNotInput.sLockedTag), i = r(n)), e.val(oStepingNotInput.sPrefix + i + oStepingNotInput.sSuffix), o.val(i), typeof oStepingNotInput.fCallFunc == "function" && oStepingNotInput.fCallFunc(i)
            }
            var t = n(this);
            oStepingNotInput.nNowValue = parseFloat(oStepingNotInput.nStartNumb);
            var u = t.find(oStepingNotInput.sAddBtn), f = t.find(oStepingNotInput.sReduceBtn), e = t.find(oStepingNotInput.sBaseInput), o = t.find(oStepingNotInput.sValueInput);
            i(oStepingNotInput.nNowValue), e.bind({blur: function() {
                    oStepingNotInput.nNowValue = parseFloat(n(this).val()), i(oStepingNotInput.nNowValue)
                }}), u.bind({click: function() {
                    if (n(this).find("span:first").hasClass(oStepingNotInput.sLockedTag))
                        return !1;
                    oStepingNotInput.nNowValue = oStepingNotInput.nNowValue + oStepingNotInput.nStride, i(oStepingNotInput.nNowValue)
                }}), f.bind({click: function() {
                    if (n(this).find("span:first").hasClass(oStepingNotInput.sLockedTag))
                        return !1;
                    oStepingNotInput.nNowValue = oStepingNotInput.nNowValue - oStepingNotInput.nStride, i(oStepingNotInput.nNowValue)
                }})
        })
    }, n.fn.dragbleCont = function(t) {
        var r = {nTimeSet: 1e3,fDragFunc: "",fCantDragFunc: "",fDragIngFunc: "",fDragEndFunc: ""}, i = n.extend({}, r, t);
        return this.each(function() {
            var t = n(this), r = !1, e = null, o = 0, c = 0, l = 0, u = 0, f = 0, s = 0, h = 0;
            t.off().on({mousedown: function(s) {
                    s.preventDefault && s.preventDefault(), o = n(this).position(), c = o.left, c = o.top, u = s.pageX, f = s.pageY, e = setTimeout(function() {
                        r = !0, typeof i.fDragFunc == "function" && i.fDragFunc(t, u, f)
                    }, 500)
                },mouseup: function() {
                    clearTimeout(e), r = !1, typeof i.fCantDragFunc == "function" && i.fCantDragFunc(t, u, f)
                }});
            n(document).bind({mousemove: function(n) {
                    if (r)
                        s = n.pageX, h = n.pageY, typeof i.fDragIngFunc == "function" && i.fDragIngFunc(t, s, h);
                    else
                        return !1
                },mouseup: function() {
                    clearTimeout(e), r && (r = !1, typeof i.fDragEndFunc == "function" && i.fDragEndFunc(t, u, f, s, h))
                }})
        })
    }, n.fn.userEditor = function() {
        return n.userEditorFunc = {editorLowerSet: function(t, i, r, u) {
                switch (t) {
                    case 0:
                        n("#editor_lower input[name=el_user_type]").eq(0).attr("checked", !0);
                        break;
                    case 1:
                        n("#editor_lower input[name=el_user_type]").eq(1).attr("checked", !0);
                        break;
                    default:
                        n("#editor_lower input[name=el_user_type]").eq(1).attr("checked", !0)
                }
                n("#el_username").val(i), n("#el_nicname").val(r), n("#el_rebate_steping").find("input.sti_base").val(u + "%"), n("#el_rebate_steping").find("input.sti_value").val(u)
            },editorLowerReset: function() {
                n("#editor_lower input[name=el_user_type]").attr("checked", !1), n("#el_username,#el_nicname,#el_rebate_steping input.sti_base,#el_rebate_steping input.sti_value").val("")
            },editorLowerSubmit: function(n) {
                n()
            }}, this.each(function() {
            n(this).bind({click: function() {
                    var t = n(this).attr("data-user-id");
                    return ctx.ajax({url: "./ajax/user.php?action=editor&uid=" + t,dataType: "JSON",beforeSend: function() {
                            n("#base_loading").stop(!0, !1).fadeIn()
                        },success: function(t) {
                            if (n("#base_loading").stop(!0, !1).hide(), t) {
                                n.userEditorFunc.editorLowerSet(t[0], t[2], t[1], t[3]);
                                var i = new Number(n("#el_rebate_steping input[type=hidden]:first").val());
                                n("#el_rebate_steping").stepingInput({nMinNumb: 0,nMaxNumb: 3.5,nStartNumb: i,nStride: .1,sSuffix: "%",sLockedTag: "locked",fCallFunc: function(t) {
                                        n("#el_rebate_steping_tips").html(t + "%&nbsp;&nbsp;-&nbsp;&nbsp;3.50%")
                                    }}), n("#el_cofirm").unbind().bind({click: function() {
                                        n.userEditorFunc.editorLowerSubmit(function() {
                                            alert("用户信息编辑成功！")
                                        })
                                    }}), n("#el_chanle").unbind().bind({click: function() {
                                        n.userEditorFunc.editorLowerReset(), n.dialogContentSet.hideDialogCont("#editor_lower")
                                    }}), n.dialogCont({contName: "#editor_lower",hideFunc: function() {
                                        n.userEditorFunc.editorLowerReset()
                                    }})
                            } else
                                alert("无权操作！")
                        },error: function() {
                            n("#base_loading").stop(!0, !1).fadeOut(function() {
                                alert("数据请求失败，请稍后再试！")
                            })
                        }}), !1
                }})
        })
    }, n.sideTag = function() {
        function h() {
            t.find("ul li").each(function(t) {
                var i = n(this);
                if (i.css({"z-index": 9 * t}), t !== 0) {
                    i.find("em.st_remove").length == 0 && i.append('<em class="st_remove" title="移除">移除</em>'), i.find("em.st_remove").hide();
                    i.on({mouseenter: function() {
                            i.find("em.st_remove").show()
                        },mouseleave: function() {
                            i.find("em.st_remove").hide()
                        }})
                }
                i.find("em.st_remove").off().on({click: function() {
                        if (confirm("确定要移除这个收藏吗？"))
                            i.stop(!0, !1).slideUp().dequeue().fadeOut(function() {
                                i.remove()
                            });
                        else
                            return !1
                    }})
            })
        }
        var t = n("#side_tag"), f = t.position(), e = f.left, c = e + t.outerWidth(), o = f.top, l = o + t.outerHeight(), i = null, r = null, u, a, s;
        sAwardUrl = null, s = 1e3, h(), n("#betting_type ul:first li").dragbleCont({nTimeSet: s,fDragFunc: function(t, f, e) {
                i = _curLotteryName, r = t.text(), sAwardUrl = t.attr("data-url"), u = i.trim() + r.trim(), a = t.hasClass("current"), n("body").append('<div id="move_type"><span class="mt_award_name">' + i + '</span><span class="mt_award_model">' + r + "</span></div>"), n("#move_type").css({left: f - 55,top: e - 29,cursor: "-webkit-grab"})
            },fContDragFunc: function() {
                n("#move_type").remove()
            },fDragIngFunc: function(t, i, r) {
                n("#move_type").css({left: i - 55,top: r - 29,cursor: "-webkit-grabbing"})
            },fDragEndFunc: function(t, f, s, a, v) {
                if (a - 55 > e && a - 55 < c && v - 29 > o && v - 29 < l) {
                    if (n("#side_tag ul:first>li[playMark=" + u + "]").length > 0) {
                        n("#move_type").remove(), alert("当前玩法已经存在，不需要再次添加!");
                        return
                    }
                    n("#side_tag ul:first li").length >= 7 ? (n("#move_type").remove(), alert("最多只能收藏6个玩法！")) : (n("#side_tag ul:first").append('<li class="formalPlay" playMark = "' + u + '"><a href="' + sAwardUrl + '"><span class="st_award_name">' + i + '</span><span class="st_award_model">' + r + "</span></a></li>"), n("#move_type").remove(), updateUserLeftSideSetting(), h())
                } else
                    n("#move_type").stop(!0, !1).animate({left: f - 55,top: s - 29}).dequeue().fadeOut(function() {
                        n("#move_type").remove()
                    })
            }})
    }, n.novice = function() {
        n(".nt_item").relCenter();
        var i = parseInt(n.iStorage.getOne("nv_int")), t = 0;
        i || (n.iStorage.insert("nv_int", 0), i = parseInt(n.iStorage.getOne("nv_int")));
        switch (i) {
            case 0:
                n("#novice_tutorial").show(), n(".nt_item").eq(t).show();
                break;
            case 1:
                n("#novice_tutorial").hide();
                break;
            default:
                n("#novice_tutorial").hide()
        }
        n("#show_nt").bind({click: function() {
                n("#novice_tutorial").is(":visible") ? n("#novice_tutorial").hide() : (n("#novice_tutorial").show(), n(".nt_item").eq(t).show())
            }}), n(".nti_cancel,#close_nt,#end_nt").bind({click: function() {
                n("#novice_tutorial").hide(), n.iStorage.insert("nv_int", 1), i = parseInt(n.iStorage.getOne("nv_int"))
            }}), n(".prev_nt").bind({click: function() {
                t = parseInt(t - 1), n(".nt_item").fadeOut().eq(t).fadeIn()
            }}), n(".next_nt").bind({click: function() {
                t = parseInt(t + 1), n(".nt_item").fadeOut().eq(t).fadeIn()
            }})
    }
}(jQuery), function(n, t) {
    function i(t, i) {
        var u, f, e, o = t.nodeName.toLowerCase();
        return "area" === o ? (u = t.parentNode, f = u.name, !t.href || !f || u.nodeName.toLowerCase() !== "map" ? !1 : (e = n("img[usemap=#" + f + "]")[0], !!e && r(e))) : (/input|select|textarea|button|object/.test(o) ? !t.disabled : "a" === o ? t.href || i : i) && r(t)
    }
    function r(t) {
        return n.expr.filters.visible(t) && !n(t).parents().andSelf().filter(function() {
            return n.css(this, "visibility") === "hidden"
        }).length
    }
    var u = 0, f = /^ui-id-\d+$/;
    (n.ui = n.ui || {}, n.ui.version) || (n.extend(n.ui, {version: "1.9.1",keyCode: {BACKSPACE: 8,COMMA: 188,DELETE: 46,DOWN: 40,END: 35,ENTER: 13,ESCAPE: 27,HOME: 36,LEFT: 37,NUMPAD_ADD: 107,NUMPAD_DECIMAL: 110,NUMPAD_DIVIDE: 111,NUMPAD_ENTER: 108,NUMPAD_MULTIPLY: 106,NUMPAD_SUBTRACT: 109,PAGE_DOWN: 34,PAGE_UP: 33,PERIOD: 190,RIGHT: 39,SPACE: 32,TAB: 9,UP: 38}}), n.fn.extend({_focus: n.fn.focus,focus: function(t, i) {
            return typeof t == "number" ? this.each(function() {
                var r = this;
                setTimeout(function() {
                    n(r).focus(), i && i.call(r)
                }, t)
            }) : this._focus.apply(this, arguments)
        },scrollParent: function() {
            var t;
            return t = n.ui.ie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? this.parents().filter(function() {
                return /(relative|absolute|fixed)/.test(n.css(this, "position")) && /(auto|scroll)/.test(n.css(this, "overflow") + n.css(this, "overflow-y") + n.css(this, "overflow-x"))
            }).eq(0) : this.parents().filter(function() {
                return /(auto|scroll)/.test(n.css(this, "overflow") + n.css(this, "overflow-y") + n.css(this, "overflow-x"))
            }).eq(0), /fixed/.test(this.css("position")) || !t.length ? n(document) : t
        },zIndex: function(i) {
            if (i !== t)
                return this.css("zIndex", i);
            if (this.length)
                for (var r = n(this[0]), u, f; r.length && r[0] !== document; ) {
                    if (u = r.css("position"), (u === "absolute" || u === "relative" || u === "fixed") && (f = parseInt(r.css("zIndex"), 10), !isNaN(f) && f !== 0))
                        return f;
                    r = r.parent()
                }
            return 0
        },uniqueId: function() {
            return this.each(function() {
                this.id || (this.id = "ui-id-" + ++u)
            })
        },removeUniqueId: function() {
            return this.each(function() {
                f.test(this.id) && n(this).removeAttr("id")
            })
        }}), n("<a>").outerWidth(1).jquery || n.each(["Width", "Height"], function(i, r) {
        function u(t, i, r, u) {
            return n.each(o, function() {
                i -= parseFloat(n.css(t, "padding" + this)) || 0, r && (i -= parseFloat(n.css(t, "border" + this + "Width")) || 0), u && (i -= parseFloat(n.css(t, "margin" + this)) || 0)
            }), i
        }
        var o = r === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], f = r.toLowerCase(), e = {innerWidth: n.fn.innerWidth,innerHeight: n.fn.innerHeight,outerWidth: n.fn.outerWidth,outerHeight: n.fn.outerHeight};
        n.fn["inner" + r] = function(i) {
            return i === t ? e["inner" + r].call(this) : this.each(function() {
                n(this).css(f, u(this, i) + "px")
            })
        }, n.fn["outer" + r] = function(t, i) {
            return typeof t != "number" ? e["outer" + r].call(this, t) : this.each(function() {
                n(this).css(f, u(this, t, !0, i) + "px")
            })
        }
    }), n.extend(n.expr[":"], {data: n.expr.createPseudo ? n.expr.createPseudo(function(t) {
            return function(i) {
                return !!n.data(i, t)
            }
        }) : function(t, i, r) {
            return !!n.data(t, r[3])
        },focusable: function(t) {
            return i(t, !isNaN(n.attr(t, "tabindex")))
        },tabbable: function(t) {
            var r = n.attr(t, "tabindex"), u = isNaN(r);
            return (u || r >= 0) && i(t, !u)
        }}), n(function() {
        var i = document.body, t = i.appendChild(t = document.createElement("div"));
        t.offsetHeight, n.extend(t.style, {minHeight: "100px",height: "auto",padding: 0,borderWidth: 0}), n.support.minHeight = t.offsetHeight === 100, n.support.selectstart = "onselectstart" in t, i.removeChild(t).style.display = "none"
    }), function() {
        var t = /msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase()) || [];
        n.ui.ie = t.length ? !0 : !1, n.ui.ie6 = parseFloat(t[1], 10) === 6
    }(), n.fn.extend({disableSelection: function() {
            return this.bind((n.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function(n) {
                n.preventDefault()
            })
        },enableSelection: function() {
            return this.unbind(".ui-disableSelection")
        }}), n.extend(n.ui, {plugin: {add: function(t, i, r) {
                var u, f = n.ui[t].prototype;
                for (u in r)
                    f.plugins[u] = f.plugins[u] || [], f.plugins[u].push([i, r[u]])
            },call: function(n, t, i) {
                var r, u = n.plugins[t];
                if (u && n.element[0].parentNode && n.element[0].parentNode.nodeType !== 11)
                    for (r = 0; r < u.length; r++)
                        n.options[u[r][0]] && u[r][1].apply(n.element, i)
            }},contains: n.contains,hasScroll: function(t, i) {
            if (n(t).css("overflow") === "hidden")
                return !1;
            var r = i && i === "left" ? "scrollLeft" : "scrollTop", u = !1;
            return t[r] > 0 ? !0 : (t[r] = 1, u = t[r] > 0, t[r] = 0, u)
        },isOverAxis: function(n, t, i) {
            return n > t && n < t + i
        },isOver: function(t, i, r, u, f, e) {
            return n.ui.isOverAxis(t, r, f) && n.ui.isOverAxis(i, u, e)
        }}))
}(jQuery), function(n, t) {
    function e() {
        this.debug = !1, this._curInst = null, this._keyEvent = !1, this._disabledInputs = [], this._datepickerShowing = !1, this._inDialog = !1, this._mainDivId = "ui-datepicker-div", this._inlineClass = "ui-datepicker-inline", this._appendClass = "ui-datepicker-append", this._triggerClass = "ui-datepicker-trigger", this._dialogClass = "ui-datepicker-dialog", this._disableClass = "ui-datepicker-disabled", this._unselectableClass = "ui-datepicker-unselectable", this._currentClass = "ui-datepicker-current-day", this._dayOverClass = "ui-datepicker-days-cell-over", this.regional = [], this.regional[""] = {closeText: "Done",prevText: "Prev",nextText: "Next",currentText: "Today",monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],weekHeader: "Wk",dateFormat: "mm/dd/yy",firstDay: 0,isRTL: !1,showMonthAfterYear: !1,yearSuffix: ""}, this._defaults = {showOn: "focus",showAnim: "fadeIn",showOptions: {},defaultDate: null,appendText: "",buttonText: "...",buttonImage: "",buttonImageOnly: !1,hideIfNoPrevNext: !1,navigationAsDateFormat: !1,gotoCurrent: !1,changeMonth: !1,changeYear: !1,yearRange: "c-10:c+10",showOtherMonths: !1,selectOtherMonths: !1,showWeek: !1,calculateWeek: this.iso8601Week,shortYearCutoff: "+10",minDate: null,maxDate: null,duration: "fast",beforeShowDay: null,beforeShow: null,onSelect: null,onChangeMonthYear: null,onClose: null,numberOfMonths: 1,showCurrentAtPos: 0,stepMonths: 1,stepBigMonths: 12,altField: "",altFormat: "",constrainInput: !0,showButtonPanel: !1,autoSize: !1,disabled: !1}, n.extend(this._defaults, this.regional[""]), this.dpDiv = o(n('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))
    }
    function o(t) {
        var i = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
        return t.delegate(i, "mouseout", function() {
            n(this).removeClass("ui-state-hover"), this.className.indexOf("ui-datepicker-prev") != -1 && n(this).removeClass("ui-datepicker-prev-hover"), this.className.indexOf("ui-datepicker-next") != -1 && n(this).removeClass("ui-datepicker-next-hover")
        }).delegate(i, "mouseover", function() {
            n.datepicker._isDisabledDatepicker(f.inline ? t.parent()[0] : f.input[0]) || (n(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), n(this).addClass("ui-state-hover"), this.className.indexOf("ui-datepicker-prev") != -1 && n(this).addClass("ui-datepicker-prev-hover"), this.className.indexOf("ui-datepicker-next") != -1 && n(this).addClass("ui-datepicker-next-hover"))
        })
    }
    function u(i, r) {
        n.extend(i, r);
        for (var u in r)
            (r[u] == null || r[u] == t) && (i[u] = r[u]);
        return i
    }
    n.extend(n.ui, {datepicker: {version: "1.9.1"}});
    var i = "datepicker", r = +new Date, f;
    n.extend(e.prototype, {markerClassName: "hasDatepicker",maxRows: 4,log: function() {
            this.debug && console.log.apply("", arguments)
        },_widgetDatepicker: function() {
            return this.dpDiv
        },setDefaults: function(n) {
            return u(this._defaults, n || {}), this
        },_attachDatepicker: function(target, settings) {
            var inlineSettings = null, attrName, attrValue, nodeName, inline, inst;
            for (attrName in this._defaults)
                if (attrValue = target.getAttribute("date:" + attrName), attrValue) {
                    inlineSettings = inlineSettings || {};
                    try {
                        inlineSettings[attrName] = eval(attrValue)
                    } catch (err) {
                        inlineSettings[attrName] = attrValue
                    }
                }
            nodeName = target.nodeName.toLowerCase(), inline = nodeName == "div" || nodeName == "span", target.id || (this.uuid += 1, target.id = "dp" + this.uuid), inst = this._newInst(n(target), inline), inst.settings = n.extend({}, settings || {}, inlineSettings || {}), nodeName == "input" ? this._connectDatepicker(target, inst) : inline && this._inlineDatepicker(target, inst)
        },_newInst: function(t, i) {
            var r = t[0].id.replace(/([^A-Za-z0-9_-])/g, "\\\\$1");
            return {id: r,input: t,selectedDay: 0,selectedMonth: 0,selectedYear: 0,drawMonth: 0,drawYear: 0,inline: i,dpDiv: i ? o(n('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')) : this.dpDiv}
        },_connectDatepicker: function(t, r) {
            var u = n(t);
            (r.append = n([]), r.trigger = n([]), u.hasClass(this.markerClassName)) || (this._attachments(u, r), u.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker", function(n, t, i) {
                r.settings[t] = i
            }).bind("getData.datepicker", function(n, t) {
                return this._get(r, t)
            }), this._autoSize(r), n.data(t, i, r), r.settings.disabled && this._disableDatepicker(t))
        },_attachments: function(t, i) {
            var e = this._get(i, "appendText"), o = this._get(i, "isRTL"), u, r, f;
            i.append && i.append.remove(), e && (i.append = n('<span class="' + this._appendClass + '">' + e + "</span>"), t[o ? "before" : "after"](i.append)), t.unbind("focus", this._showDatepicker), i.trigger && i.trigger.remove(), u = this._get(i, "showOn"), (u == "focus" || u == "both") && t.focus(this._showDatepicker), (u == "button" || u == "both") && (r = this._get(i, "buttonText"), f = this._get(i, "buttonImage"), i.trigger = n(this._get(i, "buttonImageOnly") ? n("<img/>").addClass(this._triggerClass).attr({src: f,alt: r,title: r}) : n('<button type="button"></button>').addClass(this._triggerClass).html(f == "" ? r : n("<img/>").attr({src: f,alt: r,title: r}))), t[o ? "before" : "after"](i.trigger), i.trigger.click(function() {
                return n.datepicker._datepickerShowing && n.datepicker._lastInput == t[0] ? n.datepicker._hideDatepicker() : n.datepicker._datepickerShowing && n.datepicker._lastInput != t[0] ? (n.datepicker._hideDatepicker(), n.datepicker._showDatepicker(t[0])) : n.datepicker._showDatepicker(t[0]), !1
            }))
        },_autoSize: function(n) {
            var t, i, r;
            this._get(n, "autoSize") && !n.inline && (t = new Date(2009, 11, 20), i = this._get(n, "dateFormat"), i.match(/[DM]/) && (r = function(n) {
                for (var i = 0, r = 0, t = 0; t < n.length; t++)
                    n[t].length > i && (i = n[t].length, r = t);
                return r
            }, t.setMonth(r(this._get(n, i.match(/MM/) ? "monthNames" : "monthNamesShort"))), t.setDate(r(this._get(n, i.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - t.getDay())), n.input.attr("size", this._formatDate(n, t).length))
        },_inlineDatepicker: function(t, r) {
            var u = n(t);
            u.hasClass(this.markerClassName) || (u.addClass(this.markerClassName).append(r.dpDiv).bind("setData.datepicker", function(n, t, i) {
                r.settings[t] = i
            }).bind("getData.datepicker", function(n, t) {
                return this._get(r, t)
            }), n.data(t, i, r), this._setDate(r, this._getDefaultDate(r), !0), this._updateDatepicker(r), this._updateAlternate(r), r.settings.disabled && this._disableDatepicker(t), r.dpDiv.css("display", "block"))
        },_dialogDatepicker: function(t, r, f, e, o) {
            var s = this._dialogInst, h;
            if (s || (this.uuid += 1, h = "dp" + this.uuid, this._dialogInput = n('<input type="text" id="' + h + '" style="position: absolute; top: -100px; width: 0px;"/>'), this._dialogInput.keydown(this._doKeyDown), n("body").append(this._dialogInput), s = this._dialogInst = this._newInst(this._dialogInput, !1), s.settings = {}, n.data(this._dialogInput[0], i, s)), u(s.settings, e || {}), r = r && r.constructor == Date ? this._formatDate(s, r) : r, this._dialogInput.val(r), this._pos = o ? o.length ? o : [o.pageX, o.pageY] : null, !this._pos) {
                var c = document.documentElement.clientWidth, l = document.documentElement.clientHeight, a = document.documentElement.scrollLeft || document.body.scrollLeft, v = document.documentElement.scrollTop || document.body.scrollTop;
                this._pos = [c / 2 - 100 + a, l / 2 - 150 + v]
            }
            return this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), s.settings.onSelect = f, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), n.blockUI && n.blockUI(this.dpDiv), n.data(this._dialogInput[0], i, s), this
        },_destroyDatepicker: function(t) {
            var u = n(t), f = n.data(t, i), r;
            u.hasClass(this.markerClassName) && (r = t.nodeName.toLowerCase(), n.removeData(t, i), r == "input" ? (f.append.remove(), f.trigger.remove(), u.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)) : (r == "div" || r == "span") && u.removeClass(this.markerClassName).empty())
        },_enableDatepicker: function(t) {
            var f = n(t), e = n.data(t, i), r, u;
            f.hasClass(this.markerClassName) && (r = t.nodeName.toLowerCase(), r == "input" ? (t.disabled = !1, e.trigger.filter("button").each(function() {
                this.disabled = !1
            }).end().filter("img").css({opacity: "1.0",cursor: ""})) : (r == "div" || r == "span") && (u = f.children("." + this._inlineClass), u.children().removeClass("ui-state-disabled"), u.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)), this._disabledInputs = n.map(this._disabledInputs, function(n) {
                return n == t ? null : n
            }))
        },_disableDatepicker: function(t) {
            var f = n(t), e = n.data(t, i), r, u;
            f.hasClass(this.markerClassName) && (r = t.nodeName.toLowerCase(), r == "input" ? (t.disabled = !0, e.trigger.filter("button").each(function() {
                this.disabled = !0
            }).end().filter("img").css({opacity: "0.5",cursor: "default"})) : (r == "div" || r == "span") && (u = f.children("." + this._inlineClass), u.children().addClass("ui-state-disabled"), u.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)), this._disabledInputs = n.map(this._disabledInputs, function(n) {
                return n == t ? null : n
            }), this._disabledInputs[this._disabledInputs.length] = t)
        },_isDisabledDatepicker: function(n) {
            if (!n)
                return !1;
            for (var t = 0; t < this._disabledInputs.length; t++)
                if (this._disabledInputs[t] == n)
                    return !0;
            return !1
        },_getInst: function(t) {
            try {
                return n.data(t, i)
            } catch (r) {
                throw "Missing instance data for this datepicker";
            }
        },_optionDatepicker: function(i, r, f) {
            var e = this._getInst(i), o;
            if (arguments.length == 2 && typeof r == "string")
                return r == "defaults" ? n.extend({}, n.datepicker._defaults) : e ? r == "all" ? n.extend({}, e.settings) : this._get(e, r) : null;
            if (o = r || {}, typeof r == "string" && (o = {}, o[r] = f), e) {
                this._curInst == e && this._hideDatepicker();
                var c = this._getDateDatepicker(i, !0), s = this._getMinMaxDate(e, "min"), h = this._getMinMaxDate(e, "max");
                u(e.settings, o), s !== null && o.dateFormat !== t && o.minDate === t && (e.settings.minDate = this._formatDate(e, s)), h !== null && o.dateFormat !== t && o.maxDate === t && (e.settings.maxDate = this._formatDate(e, h)), this._attachments(n(i), e), this._autoSize(e), this._setDate(e, c), this._updateAlternate(e), this._updateDatepicker(e)
            }
        },_changeDatepicker: function(n, t, i) {
            this._optionDatepicker(n, t, i)
        },_refreshDatepicker: function(n) {
            var t = this._getInst(n);
            t && this._updateDatepicker(t)
        },_setDateDatepicker: function(n, t) {
            var i = this._getInst(n);
            i && (this._setDate(i, t), this._updateDatepicker(i), this._updateAlternate(i))
        },_getDateDatepicker: function(n, t) {
            var i = this._getInst(n);
            return i && !i.inline && this._setDateFromField(i, t), i ? this._getDate(i) : null
        },_doKeyDown: function(t) {
            var i = n.datepicker._getInst(t.target), r = !0, e = i.dpDiv.is(".ui-datepicker-rtl"), u, f, o;
            if (i._keyEvent = !0, n.datepicker._datepickerShowing)
                switch (t.keyCode) {
                    case 9:
                        n.datepicker._hideDatepicker(), r = !1;
                        break;
                    case 13:
                        return u = n("td." + n.datepicker._dayOverClass + ":not(." + n.datepicker._currentClass + ")", i.dpDiv), u[0] && n.datepicker._selectDay(t.target, i.selectedMonth, i.selectedYear, u[0]), f = n.datepicker._get(i, "onSelect"), f ? (o = n.datepicker._formatDate(i), f.apply(i.input ? i.input[0] : null, [o, i])) : n.datepicker._hideDatepicker(), !1;
                    case 27:
                        n.datepicker._hideDatepicker();
                        break;
                    case 33:
                        n.datepicker._adjustDate(t.target, t.ctrlKey ? -n.datepicker._get(i, "stepBigMonths") : -n.datepicker._get(i, "stepMonths"), "M");
                        break;
                    case 34:
                        n.datepicker._adjustDate(t.target, t.ctrlKey ? +n.datepicker._get(i, "stepBigMonths") : +n.datepicker._get(i, "stepMonths"), "M");
                        break;
                    case 35:
                        (t.ctrlKey || t.metaKey) && n.datepicker._clearDate(t.target), r = t.ctrlKey || t.metaKey;
                        break;
                    case 36:
                        (t.ctrlKey || t.metaKey) && n.datepicker._gotoToday(t.target), r = t.ctrlKey || t.metaKey;
                        break;
                    case 37:
                        (t.ctrlKey || t.metaKey) && n.datepicker._adjustDate(t.target, e ? 1 : -1, "D"), r = t.ctrlKey || t.metaKey, t.originalEvent.altKey && n.datepicker._adjustDate(t.target, t.ctrlKey ? -n.datepicker._get(i, "stepBigMonths") : -n.datepicker._get(i, "stepMonths"), "M");
                        break;
                    case 38:
                        (t.ctrlKey || t.metaKey) && n.datepicker._adjustDate(t.target, -7, "D"), r = t.ctrlKey || t.metaKey;
                        break;
                    case 39:
                        (t.ctrlKey || t.metaKey) && n.datepicker._adjustDate(t.target, e ? -1 : 1, "D"), r = t.ctrlKey || t.metaKey, t.originalEvent.altKey && n.datepicker._adjustDate(t.target, t.ctrlKey ? +n.datepicker._get(i, "stepBigMonths") : +n.datepicker._get(i, "stepMonths"), "M");
                        break;
                    case 40:
                        (t.ctrlKey || t.metaKey) && n.datepicker._adjustDate(t.target, 7, "D"), r = t.ctrlKey || t.metaKey;
                        break;
                    default:
                        r = !1
                }
            else
                t.keyCode == 36 && t.ctrlKey ? n.datepicker._showDatepicker(this) : r = !1;
            r && (t.preventDefault(), t.stopPropagation())
        },_doKeyPress: function(i) {
            var f = n.datepicker._getInst(i.target), r, u;
            if (n.datepicker._get(f, "constrainInput"))
                return r = n.datepicker._possibleChars(n.datepicker._get(f, "dateFormat")), u = String.fromCharCode(i.charCode == t ? i.keyCode : i.charCode), i.ctrlKey || i.metaKey || u < " " || !r || r.indexOf(u) > -1
        },_doKeyUp: function(t) {
            var i = n.datepicker._getInst(t.target), r;
            if (i.input.val() != i.lastVal)
                try {
                    r = n.datepicker.parseDate(n.datepicker._get(i, "dateFormat"), i.input ? i.input.val() : null, n.datepicker._getFormatConfig(i)), r && (n.datepicker._setDateFromField(i), n.datepicker._updateAlternate(i), n.datepicker._updateDatepicker(i))
                } catch (u) {
                    n.datepicker.log(u)
                }
            return !0
        },_showDatepicker: function(t) {
            var i, o, s, f, e;
            if ((t = t.target || t, t.nodeName.toLowerCase() != "input" && (t = n("input", t.parentNode)[0]), !n.datepicker._isDisabledDatepicker(t) && n.datepicker._lastInput != t) && (i = n.datepicker._getInst(t), n.datepicker._curInst && n.datepicker._curInst != i && (n.datepicker._curInst.dpDiv.stop(!0, !0), i && n.datepicker._datepickerShowing && n.datepicker._hideDatepicker(n.datepicker._curInst.input[0])), o = n.datepicker._get(i, "beforeShow"), s = o ? o.apply(t, [t, i]) : {}, s !== !1) && (u(i.settings, s), i.lastVal = null, n.datepicker._lastInput = t, n.datepicker._setDateFromField(i), n.datepicker._inDialog && (t.value = ""), n.datepicker._pos || (n.datepicker._pos = n.datepicker._findPos(t), n.datepicker._pos[1] += t.offsetHeight), f = !1, n(t).parents().each(function() {
                return f |= n(this).css("position") == "fixed", !f
            }), e = {left: n.datepicker._pos[0],top: n.datepicker._pos[1]}, n.datepicker._pos = null, i.dpDiv.empty(), i.dpDiv.css({position: "absolute",display: "block",top: "-1000px"}), n.datepicker._updateDatepicker(i), e = n.datepicker._checkOffset(i, e, f), i.dpDiv.css({position: n.datepicker._inDialog && n.blockUI ? "static" : f ? "fixed" : "absolute",display: "none",left: e.left + "px",top: e.top + "px"}), !i.inline)) {
                var r = n.datepicker._get(i, "showAnim"), h = n.datepicker._get(i, "duration"), c = function() {
                    var r = i.dpDiv.find("iframe.ui-datepicker-cover"), t;
                    !r.length || (t = n.datepicker._getBorders(i.dpDiv), r.css({left: -t[0],top: -t[1],width: i.dpDiv.outerWidth(),height: i.dpDiv.outerHeight()}))
                };
                i.dpDiv.zIndex(n(t).zIndex() + 1), n.datepicker._datepickerShowing = !0, n.effects && (n.effects.effect[r] || n.effects[r]) ? i.dpDiv.show(r, n.datepicker._get(i, "showOptions"), h, c) : i.dpDiv[r || "show"](r ? h : null, c), (!r || !h) && c(), i.input.is(":visible") && !i.input.is(":disabled") && i.input.focus(), n.datepicker._curInst = i
            }
        },_updateDatepicker: function(t) {
            var i, r, o;
            this.maxRows = 4, i = n.datepicker._getBorders(t.dpDiv), f = t, t.dpDiv.empty().append(this._generateHTML(t)), this._attachHandlers(t), r = t.dpDiv.find("iframe.ui-datepicker-cover"), !r.length || r.css({left: -i[0],top: -i[1],width: t.dpDiv.outerWidth(),height: t.dpDiv.outerHeight()}), t.dpDiv.find("." + this._dayOverClass + " a").mouseover();
            var u = this._getNumberOfMonths(t), e = u[1], s = 17;
            t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), e > 1 && t.dpDiv.addClass("ui-datepicker-multi-" + e).css("width", s * e + "em"), t.dpDiv[(u[0] != 1 || u[1] != 1 ? "add" : "remove") + "Class"]("ui-datepicker-multi"), t.dpDiv[(this._get(t, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), t == n.datepicker._curInst && n.datepicker._datepickerShowing && t.input && t.input.is(":visible") && !t.input.is(":disabled") && t.input[0] != document.activeElement && t.input.focus(), t.yearshtml && (o = t.yearshtml, setTimeout(function() {
                o === t.yearshtml && t.yearshtml && t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml), o = t.yearshtml = null
            }, 0))
        },_getBorders: function(n) {
            var t = function(n) {
                return {thin: 1,medium: 2,thick: 3}[n] || n
            };
            return [parseFloat(t(n.css("border-left-width"))), parseFloat(t(n.css("border-top-width")))]
        },_checkOffset: function(t, i, r) {
            var u = t.dpDiv.outerWidth(), f = t.dpDiv.outerHeight(), h = t.input ? t.input.outerWidth() : 0, o = t.input ? t.input.outerHeight() : 0, e = document.documentElement.clientWidth + (r ? 0 : n(document).scrollLeft()), s = document.documentElement.clientHeight + (r ? 0 : n(document).scrollTop());
            return i.left -= this._get(t, "isRTL") ? u - h : 0, i.left -= r && i.left == t.input.offset().left ? n(document).scrollLeft() : 0, i.top -= r && i.top == t.input.offset().top + o ? n(document).scrollTop() : 0, i.left -= Math.min(i.left, i.left + u > e && e > u ? Math.abs(i.left + u - e) : 0), i.top -= Math.min(i.top, i.top + f > s && s > f ? Math.abs(f + o) : 0), i
        },_findPos: function(t) {
            for (var r = this._getInst(t), u = this._get(r, "isRTL"), i; t && (t.type == "hidden" || t.nodeType != 1 || n.expr.filters.hidden(t)); )
                t = t[u ? "previousSibling" : "nextSibling"];
            return i = n(t).offset(), [i.left, i.top]
        },_hideDatepicker: function(t) {
            var r = this._curInst, e;
            if (r && (!t || r == n.data(t, i)) && this._datepickerShowing) {
                var u = this._get(r, "showAnim"), o = this._get(r, "duration"), f = function() {
                    n.datepicker._tidyDialog(r)
                };
                n.effects && (n.effects.effect[u] || n.effects[u]) ? r.dpDiv.hide(u, n.datepicker._get(r, "showOptions"), o, f) : r.dpDiv[u == "slideDown" ? "slideUp" : u == "fadeIn" ? "fadeOut" : "hide"](u ? o : null, f), u || f(), this._datepickerShowing = !1, e = this._get(r, "onClose"), e && e.apply(r.input ? r.input[0] : null, [r.input ? r.input.val() : "", r]), this._lastInput = null, this._inDialog && (this._dialogInput.css({position: "absolute",left: "0",top: "-100px"}), n.blockUI && (n.unblockUI(), n("body").append(this.dpDiv))), this._inDialog = !1
            }
        },_tidyDialog: function(n) {
            n.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
        },_checkExternalClick: function(t) {
            if (n.datepicker._curInst) {
                var i = n(t.target), r = n.datepicker._getInst(i[0]);
                (i[0].id != n.datepicker._mainDivId && i.parents("#" + n.datepicker._mainDivId).length == 0 && !i.hasClass(n.datepicker.markerClassName) && !i.closest("." + n.datepicker._triggerClass).length && n.datepicker._datepickerShowing && (!n.datepicker._inDialog || !n.blockUI) || i.hasClass(n.datepicker.markerClassName) && n.datepicker._curInst != r) && n.datepicker._hideDatepicker()
            }
        },_adjustDate: function(t, i, r) {
            var f = n(t), u = this._getInst(f[0]);
            this._isDisabledDatepicker(f[0]) || (this._adjustInstDate(u, i + (r == "M" ? this._get(u, "showCurrentAtPos") : 0), r), this._updateDatepicker(u))
        },_gotoToday: function(t) {
            var u = n(t), i = this._getInst(u[0]), r;
            this._get(i, "gotoCurrent") && i.currentDay ? (i.selectedDay = i.currentDay, i.drawMonth = i.selectedMonth = i.currentMonth, i.drawYear = i.selectedYear = i.currentYear) : (r = new Date, i.selectedDay = r.getDate(), i.drawMonth = i.selectedMonth = r.getMonth(), i.drawYear = i.selectedYear = r.getFullYear()), this._notifyChange(i), this._adjustDate(u)
        },_selectMonthYear: function(t, i, r) {
            var f = n(t), u = this._getInst(f[0]);
            u["selected" + (r == "M" ? "Month" : "Year")] = u["draw" + (r == "M" ? "Month" : "Year")] = parseInt(i.options[i.selectedIndex].value, 10), this._notifyChange(u), this._adjustDate(f)
        },_selectDay: function(t, i, r, u) {
            var e = n(t), f;
            n(u).hasClass(this._unselectableClass) || this._isDisabledDatepicker(e[0]) || (f = this._getInst(e[0]), f.selectedDay = f.currentDay = n("a", u).html(), f.selectedMonth = f.currentMonth = i, f.selectedYear = f.currentYear = r, this._selectDate(t, this._formatDate(f, f.currentDay, f.currentMonth, f.currentYear)))
        },_clearDate: function(t) {
            var i = n(t), r = this._getInst(i[0]);
            this._selectDate(i, "")
        },_selectDate: function(t, i) {
            var f = n(t), r = this._getInst(f[0]), u;
            i = i != null ? i : this._formatDate(r), r.input && r.input.val(i), this._updateAlternate(r), u = this._get(r, "onSelect"), u ? u.apply(r.input ? r.input[0] : null, [i, r]) : r.input && r.input.trigger("change"), r.inline ? this._updateDatepicker(r) : (this._hideDatepicker(), this._lastInput = r.input[0], typeof r.input[0] != "object" && r.input.focus(), this._lastInput = null)
        },_updateAlternate: function(t) {
            var i = this._get(t, "altField");
            if (i) {
                var r = this._get(t, "altFormat") || this._get(t, "dateFormat"), u = this._getDate(t), f = this.formatDate(r, u, this._getFormatConfig(t));
                n(i).each(function() {
                    n(this).val(f)
                })
            }
        },noWeekends: function(n) {
            var t = n.getDay();
            return [t > 0 && t < 6, ""]
        },iso8601Week: function(n) {
            var t = new Date(n.getTime()), i;
            return t.setDate(t.getDate() + 4 - (t.getDay() || 7)), i = t.getTime(), t.setMonth(0), t.setDate(1), Math.floor(Math.round((i - t) / 864e5) / 7) + 1
        },parseDate: function(t, i, r) {
            var l, o, v, b, u;
            if (t == null || i == null)
                throw "Invalid arguments";
            if (i = typeof i == "object" ? i.toString() : i + "", i == "")
                return null;
            l = (r ? r.shortYearCutoff : null) || this._defaults.shortYearCutoff, l = typeof l != "string" ? l : (new Date).getFullYear() % 100 + parseInt(l, 10);
            var nt = (r ? r.dayNamesShort : null) || this._defaults.dayNamesShort, g = (r ? r.dayNames : null) || this._defaults.dayNames, d = (r ? r.monthNamesShort : null) || this._defaults.monthNamesShort, tt = (r ? r.monthNames : null) || this._defaults.monthNames, e = -1, s = -1, h = -1, y = -1, p = !1, a = function(n) {
                var i = o + 1 < t.length && t.charAt(o + 1) == n;
                return i && o++, i
            }, c = function(n) {
                var r = a(n), u = n == "@" ? 14 : n == "!" ? 20 : n == "y" && r ? 4 : n == "o" ? 3 : 2, e = new RegExp("^\\d{1," + u + "}"), t = i.substring(f).match(e);
                if (!t)
                    throw "Missing number at position " + f;
                return f += t[0].length, parseInt(t[0], 10)
            }, k = function(t, r, u) {
                var o = n.map(a(t) ? u : r, function(n, t) {
                    return [[t, n]]
                }).sort(function(n, t) {
                    return -(n[1].length - t[1].length)
                }), e = -1;
                if (n.each(o, function(n, t) {
                    var r = t[1];
                    if (i.substr(f, r.length).toLowerCase() == r.toLowerCase())
                        return e = t[0], f += r.length, !1
                }), e != -1)
                    return e + 1;
                throw "Unknown name at position " + f;
            }, w = function() {
                if (i.charAt(f) != t.charAt(o))
                    throw "Unexpected literal at position " + f;
                f++
            }, f = 0;
            for (o = 0; o < t.length; o++)
                if (p)
                    t.charAt(o) == "'" && !a("'") ? p = !1 : w();
                else
                    switch (t.charAt(o)) {
                        case "d":
                            h = c("d");
                            break;
                        case "D":
                            k("D", nt, g);
                            break;
                        case "o":
                            y = c("o");
                            break;
                        case "m":
                            s = c("m");
                            break;
                        case "M":
                            s = k("M", d, tt);
                            break;
                        case "y":
                            e = c("y");
                            break;
                        case "@":
                            u = new Date(c("@")), e = u.getFullYear(), s = u.getMonth() + 1, h = u.getDate();
                            break;
                        case "!":
                            u = new Date((c("!") - this._ticksTo1970) / 1e4), e = u.getFullYear(), s = u.getMonth() + 1, h = u.getDate();
                            break;
                        case "'":
                            a("'") ? w() : p = !0;
                            break;
                        default:
                            w()
                    }
            if (f < i.length && (v = i.substr(f), !/^\s+/.test(v)))
                throw "Extra/unparsed characters found in date: " + v;
            if (e == -1 ? e = (new Date).getFullYear() : e < 100 && (e += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (e <= l ? 0 : -100)), y > -1) {
                s = 1, h = y;
                do {
                    if (b = this._getDaysInMonth(e, s - 1), h <= b)
                        break;
                    s++, h -= b
                } while (1)
            }
            if (u = this._daylightSavingAdjust(new Date(e, s - 1, h)), u.getFullYear() != e || u.getMonth() + 1 != s || u.getDate() != h)
                throw "Invalid date";
            return u
        },ATOM: "yy-mm-dd",COOKIE: "D, dd M yy",ISO_8601: "yy-mm-dd",RFC_822: "D, d M y",RFC_850: "DD, dd-M-y",RFC_1036: "D, d M y",RFC_1123: "D, d M yy",RFC_2822: "D, d M yy",RSS: "D, d M y",TICKS: "!",TIMESTAMP: "@",W3C: "yy-mm-dd",_ticksTo1970: (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * 864e9,formatDate: function(n, t, i) {
            var u;
            if (!t)
                return "";
            var h = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort, c = (i ? i.dayNames : null) || this._defaults.dayNames, l = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort, a = (i ? i.monthNames : null) || this._defaults.monthNames, f = function(t) {
                var i = u + 1 < n.length && n.charAt(u + 1) == t;
                return i && u++, i
            }, e = function(n, t, i) {
                var r = "" + t;
                if (f(n))
                    while (r.length < i)
                        r = "0" + r;
                return r
            }, s = function(n, t, i, r) {
                return f(n) ? r[t] : i[t]
            }, r = "", o = !1;
            if (t)
                for (u = 0; u < n.length; u++)
                    if (o)
                        n.charAt(u) == "'" && !f("'") ? o = !1 : r += n.charAt(u);
                    else
                        switch (n.charAt(u)) {
                            case "d":
                                r += e("d", t.getDate(), 2);
                                break;
                            case "D":
                                r += s("D", t.getDay(), h, c);
                                break;
                            case "o":
                                r += e("o", Math.round((+new Date(t.getFullYear(), t.getMonth(), t.getDate()) - +new Date(t.getFullYear(), 0, 0)) / 864e5), 3);
                                break;
                            case "m":
                                r += e("m", t.getMonth() + 1, 2);
                                break;
                            case "M":
                                r += s("M", t.getMonth(), l, a);
                                break;
                            case "y":
                                r += f("y") ? t.getFullYear() : (t.getYear() % 100 < 10 ? "0" : "") + t.getYear() % 100;
                                break;
                            case "@":
                                r += t.getTime();
                                break;
                            case "!":
                                r += t.getTime() * 1e4 + this._ticksTo1970;
                                break;
                            case "'":
                                f("'") ? r += "'" : o = !0;
                                break;
                            default:
                                r += n.charAt(u)
                        }
            return r
        },_possibleChars: function(n) {
            for (var i = "", r = !1, u = function(i) {
                var r = t + 1 < n.length && n.charAt(t + 1) == i;
                return r && t++, r
            }, t = 0; t < n.length; t++)
                if (r)
                    n.charAt(t) == "'" && !u("'") ? r = !1 : i += n.charAt(t);
                else
                    switch (n.charAt(t)) {
                        case "d":
                        case "m":
                        case "y":
                        case "@":
                            i += "0123456789";
                            break;
                        case "D":
                        case "M":
                            return null;
                        case "'":
                            u("'") ? i += "'" : r = !0;
                            break;
                        default:
                            i += n.charAt(t)
                    }
            return i
        },_get: function(n, i) {
            return n.settings[i] !== t ? n.settings[i] : this._defaults[i]
        },_setDateFromField: function(n, t) {
            var u, r, i, f, e;
            if (n.input.val() != n.lastVal) {
                u = this._get(n, "dateFormat"), r = n.lastVal = n.input ? n.input.val() : null, i = f = this._getDefaultDate(n), e = this._getFormatConfig(n);
                try {
                    i = this.parseDate(u, r, e) || f
                } catch (o) {
                    this.log(o), r = t ? "" : r
                }
                n.selectedDay = i.getDate(), n.drawMonth = n.selectedMonth = i.getMonth(), n.drawYear = n.selectedYear = i.getFullYear(), n.currentDay = r ? i.getDate() : 0, n.currentMonth = r ? i.getMonth() : 0, n.currentYear = r ? i.getFullYear() : 0, this._adjustInstDate(n)
            }
        },_getDefaultDate: function(n) {
            return this._restrictMinMax(n, this._determineDate(n, this._get(n, "defaultDate"), new Date))
        },_determineDate: function(t, i, r) {
            var f = function(n) {
                var t = new Date;
                return t.setDate(t.getDate() + n), t
            }, e = function(i) {
                try {
                    return n.datepicker.parseDate(n.datepicker._get(t, "dateFormat"), i, n.datepicker._getFormatConfig(t))
                } catch (h) {
                }
                for (var o = (i.toLowerCase().match(/^c/) ? n.datepicker._getDate(t) : null) || new Date, f = o.getFullYear(), e = o.getMonth(), r = o.getDate(), s = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, u = s.exec(i); u; ) {
                    switch (u[2] || "d") {
                        case "d":
                        case "D":
                            r += parseInt(u[1], 10);
                            break;
                        case "w":
                        case "W":
                            r += parseInt(u[1], 10) * 7;
                            break;
                        case "m":
                        case "M":
                            e += parseInt(u[1], 10), r = Math.min(r, n.datepicker._getDaysInMonth(f, e));
                            break;
                        case "y":
                        case "Y":
                            f += parseInt(u[1], 10), r = Math.min(r, n.datepicker._getDaysInMonth(f, e))
                    }
                    u = s.exec(i)
                }
                return new Date(f, e, r)
            }, u = i == null || i === "" ? r : typeof i == "string" ? e(i) : typeof i == "number" ? isNaN(i) ? r : f(i) : new Date(i.getTime());
            return u = u && u.toString() == "Invalid Date" ? r : u, u && (u.setHours(0), u.setMinutes(0), u.setSeconds(0), u.setMilliseconds(0)), this._daylightSavingAdjust(u)
        },_daylightSavingAdjust: function(n) {
            return n ? (n.setHours(n.getHours() > 12 ? n.getHours() + 2 : 0), n) : null
        },_setDate: function(n, t, i) {
            var u = !t, f = n.selectedMonth, e = n.selectedYear, r = this._restrictMinMax(n, this._determineDate(n, t, new Date));
            n.selectedDay = n.currentDay = r.getDate(), n.drawMonth = n.selectedMonth = n.currentMonth = r.getMonth(), n.drawYear = n.selectedYear = n.currentYear = r.getFullYear(), (f != n.selectedMonth || e != n.selectedYear) && !i && this._notifyChange(n), this._adjustInstDate(n), n.input && n.input.val(u ? "" : this._formatDate(n))
        },_getDate: function(n) {
            return !n.currentYear || n.input && n.input.val() == "" ? null : this._daylightSavingAdjust(new Date(n.currentYear, n.currentMonth, n.currentDay))
        },_attachHandlers: function(t) {
            var u = this._get(t, "stepMonths"), i = "#" + t.id.replace(/\\\\/g, "\\");
            t.dpDiv.find("[data-handler]").map(function() {
                var t = {prev: function() {
                        window["DP_jQuery_" + r].datepicker._adjustDate(i, -u, "M")
                    },next: function() {
                        window["DP_jQuery_" + r].datepicker._adjustDate(i, +u, "M")
                    },hide: function() {
                        window["DP_jQuery_" + r].datepicker._hideDatepicker()
                    },today: function() {
                        window["DP_jQuery_" + r].datepicker._gotoToday(i)
                    },selectDay: function() {
                        return window["DP_jQuery_" + r].datepicker._selectDay(i, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this), !1
                    },selectMonth: function() {
                        return window["DP_jQuery_" + r].datepicker._selectMonthYear(i, this, "M"), !1
                    },selectYear: function() {
                        return window["DP_jQuery_" + r].datepicker._selectMonthYear(i, this, "Y"), !1
                    }};
                n(this).bind(this.getAttribute("data-event"), t[this.getAttribute("data-handler")])
            })
        },_generateHTML: function(t) {
            var a = new Date, d, c, yt, h, w, tt, p, st, ut, ft, r, ot, it, s;
            a = this._daylightSavingAdjust(new Date(a.getFullYear(), a.getMonth(), a.getDate()));
            var o = this._get(t, "isRTL"), ai = this._get(t, "showButtonPanel"), wt = this._get(t, "hideIfNoPrevNext"), lt = this._get(t, "navigationAsDateFormat"), e = this._getNumberOfMonths(t), hi = this._get(t, "showCurrentAtPos"), kt = this._get(t, "stepMonths"), at = e[0] != 1 || e[1] != 1, vt = this._daylightSavingAdjust(t.currentDay ? new Date(t.currentYear, t.currentMonth, t.currentDay) : new Date(9999, 9, 9)), y = this._getMinMaxDate(t, "min"), v = this._getMinMaxDate(t, "max"), i = t.drawMonth - hi, u = t.drawYear;
            if (i < 0 && (i += 12, u--), v)
                for (d = this._daylightSavingAdjust(new Date(v.getFullYear(), v.getMonth() - e[0] * e[1] + 1, v.getDate())), d = y && d < y ? y : d; this._daylightSavingAdjust(new Date(u, i, 1)) > d; )
                    i--, i < 0 && (i = 11, u--);
            t.drawMonth = i, t.drawYear = u, c = this._get(t, "prevText"), c = lt ? this.formatDate(c, this._daylightSavingAdjust(new Date(u, i - kt, 1)), this._getFormatConfig(t)) : c, yt = this._canAdjustMonth(t, -1, u, i) ? '<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="' + c + '"><span class="ui-icon ui-icon-circle-triangle-' + (o ? "e" : "w") + '">' + c + "</span></a>" : wt ? "" : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + c + '"><span class="ui-icon ui-icon-circle-triangle-' + (o ? "e" : "w") + '">' + c + "</span></a>", h = this._get(t, "nextText"), h = lt ? this.formatDate(h, this._daylightSavingAdjust(new Date(u, i + kt, 1)), this._getFormatConfig(t)) : h;
            var ni = this._canAdjustMonth(t, 1, u, i) ? '<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="' + h + '"><span class="ui-icon ui-icon-circle-triangle-' + (o ? "w" : "e") + '">' + h + "</span></a>" : wt ? "" : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + h + '"><span class="ui-icon ui-icon-circle-triangle-' + (o ? "w" : "e") + '">' + h + "</span></a>", g = this._get(t, "currentText"), gt = this._get(t, "gotoCurrent") && t.currentDay ? vt : a;
            g = lt ? this.formatDate(g, gt, this._getFormatConfig(t)) : g;
            var ui = t.inline ? "" : '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">' + this._get(t, "closeText") + "</button>", ei = ai ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (o ? ui : "") + (this._isInRange(t, gt) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">' + g + "</button>" : "") + (o ? "" : ui) + "</div>" : "", l = parseInt(this._get(t, "firstDay"), 10);
            l = isNaN(l) ? 0 : l;
            var ii = this._get(t, "showWeek"), oi = this._get(t, "dayNames"), yi = this._get(t, "dayNamesShort"), si = this._get(t, "dayNamesMin"), li = this._get(t, "monthNames"), fi = this._get(t, "monthNamesShort"), pt = this._get(t, "beforeShowDay"), ht = this._get(t, "showOtherMonths"), ci = this._get(t, "selectOtherMonths"), vi = this._get(t, "calculateWeek") || this.iso8601Week, ri = this._getDefaultDate(t), rt = "";
            for (w = 0; w < e[0]; w++) {
                for (tt = "", this.maxRows = 4, p = 0; p < e[1]; p++) {
                    var ti = this._daylightSavingAdjust(new Date(u, i, t.selectedDay)), k = " ui-corner-all", f = "";
                    if (at) {
                        if (f += '<div class="ui-datepicker-group', e[1] > 1)
                            switch (p) {
                                case 0:
                                    f += " ui-datepicker-group-first", k = " ui-corner-" + (o ? "right" : "left");
                                    break;
                                case e[1] - 1:
                                    f += " ui-datepicker-group-last", k = " ui-corner-" + (o ? "left" : "right");
                                    break;
                                default:
                                    f += " ui-datepicker-group-middle", k = ""
                            }
                        f += '">'
                    }
                    for (f += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + k + '">' + (/all|left/.test(k) && w == 0 ? o ? ni : yt : "") + (/all|right/.test(k) && w == 0 ? o ? yt : ni : "") + this._generateMonthYearHeader(t, i, u, y, v, w > 0 || p > 0, li, fi) + '</div><table class="ui-datepicker-calendar"><thead><tr>', st = ii ? '<th class="ui-datepicker-week-col">' + this._get(t, "weekHeader") + "</th>" : "", s = 0; s < 7; s++)
                        ut = (s + l) % 7, st += "<th" + ((s + l + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : "") + '><span title="' + oi[ut] + '">' + si[ut] + "</span></th>";
                    f += st + "</tr></thead><tbody>", ft = this._getDaysInMonth(u, i), u == t.selectedYear && i == t.selectedMonth && (t.selectedDay = Math.min(t.selectedDay, ft));
                    var dt = (this._getFirstDayOfMonth(u, i) - l + 7) % 7, et = Math.ceil((dt + ft) / 7), bt = at ? this.maxRows > et ? this.maxRows : et : et;
                    for (this.maxRows = bt, r = this._daylightSavingAdjust(new Date(u, i, 1 - dt)), ot = 0; ot < bt; ot++) {
                        for (f += "<tr>", it = ii ? '<td class="ui-datepicker-week-col">' + this._get(t, "calculateWeek")(r) + "</td>" : "", s = 0; s < 7; s++) {
                            var nt = pt ? pt.apply(t.input ? t.input[0] : null, [r]) : [!0, ""], b = r.getMonth() != i, ct = b && !ci || !nt[0] || y && r < y || v && r > v;
                            it += '<td class="' + ((s + l + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (b ? " ui-datepicker-other-month" : "") + (r.getTime() == ti.getTime() && i == t.selectedMonth && t._keyEvent || ri.getTime() == r.getTime() && ri.getTime() == ti.getTime() ? " " + this._dayOverClass : "") + (ct ? " " + this._unselectableClass + " ui-state-disabled" : "") + (b && !ht ? "" : " " + nt[1] + (r.getTime() == vt.getTime() ? " " + this._currentClass : "") + (r.getTime() == a.getTime() ? " ui-datepicker-today" : "")) + '"' + ((!b || ht) && nt[2] ? ' title="' + nt[2] + '"' : "") + (ct ? "" : ' data-handler="selectDay" data-event="click" data-month="' + r.getMonth() + '" data-year="' + r.getFullYear() + '"') + ">" + (b && !ht ? "&#xa0;" : ct ? '<span class="ui-state-default">' + r.getDate() + "</span>" : '<a class="ui-state-default' + (r.getTime() == a.getTime() ? " ui-state-highlight" : "") + (r.getTime() == vt.getTime() ? " ui-state-active" : "") + (b ? " ui-priority-secondary" : "") + '" href="#">' + r.getDate() + "</a>") + "</td>", r.setDate(r.getDate() + 1), r = this._daylightSavingAdjust(r)
                        }
                        f += it + "</tr>"
                    }
                    i++, i > 11 && (i = 0, u++), f += "</tbody></table>" + (at ? "</div>" + (e[0] > 0 && p == e[1] - 1 ? '<div class="ui-datepicker-row-break"></div>' : "") : ""), tt += f
                }
                rt += tt
            }
            return rt += ei + (n.ui.ie6 && !t.inline ? '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : ""), t._keyEvent = !1, rt
        },_generateMonthYearHeader: function(n, t, i, r, u, f, e, o) {
            var v = this._get(n, "changeMonth"), y = this._get(n, "changeYear"), g = this._get(n, "showMonthAfterYear"), c = '<div class="ui-datepicker-title">', l = "", p, w, h;
            if (f || !v)
                l += '<span class="ui-datepicker-month">' + e[t] + "</span>";
            else {
                for (p = r && r.getFullYear() == i, w = u && u.getFullYear() == i, l += '<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">', h = 0; h < 12; h++)
                    (!p || h >= r.getMonth()) && (!w || h <= u.getMonth()) && (l += '<option value="' + h + '"' + (h == t ? ' selected="selected"' : "") + ">" + o[h] + "</option>");
                l += "</select>"
            }
            if (g || (c += l + (f || !v || !y ? "&#xa0;" : "")), !n.yearshtml)
                if (n.yearshtml = "", f || !y)
                    c += '<span class="ui-datepicker-year">' + i + "</span>";
                else {
                    var b = this._get(n, "yearRange").split(":"), k = (new Date).getFullYear(), d = function(n) {
                        var t = n.match(/c[+-].*/) ? i + parseInt(n.substring(1), 10) : n.match(/[+-].*/) ? k + parseInt(n, 10) : parseInt(n, 10);
                        return isNaN(t) ? k : t
                    }, s = d(b[0]), a = Math.max(s, d(b[1] || ""));
                    for (s = r ? Math.max(s, r.getFullYear()) : s, a = u ? Math.min(a, u.getFullYear()) : a, n.yearshtml += '<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">'; s <= a; s++)
                        n.yearshtml += '<option value="' + s + '"' + (s == i ? ' selected="selected"' : "") + ">" + s + "</option>";
                    n.yearshtml += "</select>", c += n.yearshtml, n.yearshtml = null
                }
            return c += this._get(n, "yearSuffix"), g && (c += (f || !v || !y ? "&#xa0;" : "") + l), c += "</div>", c
        },_adjustInstDate: function(n, t, i) {
            var u = n.drawYear + (i == "Y" ? t : 0), f = n.drawMonth + (i == "M" ? t : 0), e = Math.min(n.selectedDay, this._getDaysInMonth(u, f)) + (i == "D" ? t : 0), r = this._restrictMinMax(n, this._daylightSavingAdjust(new Date(u, f, e)));
            n.selectedDay = r.getDate(), n.drawMonth = n.selectedMonth = r.getMonth(), n.drawYear = n.selectedYear = r.getFullYear(), (i == "M" || i == "Y") && this._notifyChange(n)
        },_restrictMinMax: function(n, t) {
            var r = this._getMinMaxDate(n, "min"), u = this._getMinMaxDate(n, "max"), i = r && t < r ? r : t;
            return i = u && i > u ? u : i, i
        },_notifyChange: function(n) {
            var t = this._get(n, "onChangeMonthYear");
            t && t.apply(n.input ? n.input[0] : null, [n.selectedYear, n.selectedMonth + 1, n])
        },_getNumberOfMonths: function(n) {
            var t = this._get(n, "numberOfMonths");
            return t == null ? [1, 1] : typeof t == "number" ? [1, t] : t
        },_getMinMaxDate: function(n, t) {
            return this._determineDate(n, this._get(n, t + "Date"), null)
        },_getDaysInMonth: function(n, t) {
            return 32 - this._daylightSavingAdjust(new Date(n, t, 32)).getDate()
        },_getFirstDayOfMonth: function(n, t) {
            return new Date(n, t, 1).getDay()
        },_canAdjustMonth: function(n, t, i, r) {
            var f = this._getNumberOfMonths(n), u = this._daylightSavingAdjust(new Date(i, r + (t < 0 ? t : f[0] * f[1]), 1));
            return t < 0 && u.setDate(this._getDaysInMonth(u.getFullYear(), u.getMonth())), this._isInRange(n, u)
        },_isInRange: function(n, t) {
            var i = this._getMinMaxDate(n, "min"), r = this._getMinMaxDate(n, "max");
            return (!i || t.getTime() >= i.getTime()) && (!r || t.getTime() <= r.getTime())
        },_getFormatConfig: function(n) {
            var t = this._get(n, "shortYearCutoff");
            return t = typeof t != "string" ? t : (new Date).getFullYear() % 100 + parseInt(t, 10), {shortYearCutoff: t,dayNamesShort: this._get(n, "dayNamesShort"),dayNames: this._get(n, "dayNames"),monthNamesShort: this._get(n, "monthNamesShort"),monthNames: this._get(n, "monthNames")}
        },_formatDate: function(n, t, i, r) {
            t || (n.currentDay = n.selectedDay, n.currentMonth = n.selectedMonth, n.currentYear = n.selectedYear);
            var u = t ? typeof t == "object" ? t : this._daylightSavingAdjust(new Date(r, i, t)) : this._daylightSavingAdjust(new Date(n.currentYear, n.currentMonth, n.currentDay));
            return this.formatDate(this._get(n, "dateFormat"), u, this._getFormatConfig(n))
        }}), n.fn.datepicker = function(t) {
        if (!this.length)
            return this;
        n.datepicker.initialized || (n(document).mousedown(n.datepicker._checkExternalClick).find(document.body).append(n.datepicker.dpDiv), n.datepicker.initialized = !0);
        var i = Array.prototype.slice.call(arguments, 1);
        return typeof t != "string" || t != "isDisabled" && t != "getDate" && t != "widget" ? t == "option" && arguments.length == 2 && typeof arguments[1] == "string" ? n.datepicker["_" + t + "Datepicker"].apply(n.datepicker, [this[0]].concat(i)) : this.each(function() {
            typeof t == "string" ? n.datepicker["_" + t + "Datepicker"].apply(n.datepicker, [this].concat(i)) : n.datepicker._attachDatepicker(this, t)
        }) : n.datepicker["_" + t + "Datepicker"].apply(n.datepicker, [this[0]].concat(i))
    }, n.datepicker = new e, n.datepicker.initialized = !1, n.datepicker.uuid = +new Date, n.datepicker.version = "1.9.1", window["DP_jQuery_" + r] = n
}(jQuery), function(n) {
    function t(n) {
        (n.attr("title") || typeof n.attr("original-title") != "string") && n.attr("original-title", n.attr("title") || "").removeAttr("title")
    }
    function i(i, r) {
        this.$element = n(i), this.options = r, this.enabled = !0, t(this.$element)
    }
    i.prototype = {show: function() {
            var o = this.getTitle(), i;
            if (o && this.enabled) {
                i = this.tip(), i.find(".tipsy-inner")[this.options.html ? "html" : "text"](o), i[0].className = "tipsy", i.remove().css({top: 0,left: 0,visibility: "hidden",display: "block"}).appendTo(document.body);
                var t = n.extend({}, this.$element.offset(), {width: this.$element[0].offsetWidth,height: this.$element[0].offsetHeight}), u = i[0].offsetWidth, e = i[0].offsetHeight, f = typeof this.options.gravity == "function" ? this.options.gravity.call(this.$element[0]) : this.options.gravity, r;
                switch (f.charAt(0)) {
                    case "n":
                        r = {top: t.top + t.height + this.options.offset,left: t.left + t.width / 2 - u / 2};
                        break;
                    case "s":
                        r = {top: t.top - e - this.options.offset,left: t.left + t.width / 2 - u / 2};
                        break;
                    case "e":
                        r = {top: t.top + t.height / 2 - e / 2,left: t.left - u - this.options.offset};
                        break;
                    case "w":
                        r = {top: t.top + t.height / 2 - e / 2,left: t.left + t.width + this.options.offset}
                }
                f.length == 2 && (r.left = f.charAt(1) == "w" ? t.left + t.width / 2 - 15 : t.left + t.width / 2 - u + 15), i.css(r).addClass("tipsy-" + f), this.options.fade ? i.stop().css({opacity: 0,display: "block",visibility: "visible"}).animate({opacity: this.options.opacity}) : i.css({visibility: "visible",opacity: this.options.opacity})
            }
        },hide: function() {
            this.options.fade ? this.tip().stop().fadeOut(function() {
                n(this).remove()
            }) : this.tip().remove()
        },getTitle: function() {
            var r = this.$element, n = this.options, i;
            return t(r), n = this.options, typeof n.title == "string" ? i = r.attr(n.title == "title" ? "original-title" : n.title) : typeof n.title == "function" && (i = n.title.call(r[0])), i = ("" + i).replace(/(^\s*|\s*$)/, ""), i || n.fallback
        },tip: function() {
            return this.$tip || (this.$tip = n('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"/></div>')), this.$tip
        },validate: function() {
            this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null)
        },enable: function() {
            this.enabled = !0
        },disable: function() {
            this.enabled = !1
        },toggleEnabled: function() {
            this.enabled = !this.enabled
        }}, n.fn.tipsy = function(t) {
        function r(r) {
            var u = n.data(r, "tipsy");
            return u || (u = new i(r, n.fn.tipsy.elementOptions(r, t)), n.data(r, "tipsy", u)), u
        }
        function f() {
            var n = r(this);
            n.hoverState = "in", t.delayIn == 0 ? n.show() : setTimeout(function() {
                n.hoverState == "in" && n.show()
            }, t.delayIn)
        }
        function e() {
            var n = r(this);
            n.hoverState = "out", t.delayOut == 0 ? n.hide() : setTimeout(function() {
                n.hoverState == "out" && n.hide()
            }, t.delayOut)
        }
        if (t === !0)
            return this.data("tipsy");
        if (typeof t == "string")
            return this.data("tipsy")[t]();
        if (t = n.extend({}, n.fn.tipsy.defaults, t), t.live || this.each(function() {
            r(this)
        }), t.trigger != "manual") {
            var u = t.live ? "live" : "bind", o = t.trigger == "hover" ? "mouseenter" : "focus", s = t.trigger == "hover" ? "mouseleave" : "blur";
            this[u](o, f)[u](s, e)
        }
        return this
    }, n.fn.tipsy.defaults = {delayIn: 0,delayOut: 0,fade: !1,fallback: "",gravity: "n",html: !1,live: !1,offset: 0,opacity: .8,title: "title",trigger: "hover"}, n.fn.tipsy.elementOptions = function(t, i) {
        return n.metadata ? n.extend({}, i, n(t).metadata()) : i
    }, n.fn.tipsy.autoNS = function() {
        return n(this).offset().top > n(document).scrollTop() + n(window).height() / 2 ? "s" : "n"
    }, n.fn.tipsy.autoWE = function() {
        return n(this).offset().left > n(document).scrollLeft() + n(window).width() / 2 ? "e" : "w"
    }
}(jQuery), function(n, t) {
    n.extend(n.ajaxSettings.accepts, {stream: "text/event-stream"});
    var i = {defaults: {label: null,url: null,open: n.noop,message: n.noop},setup: {stream: {},lastEventId: 0,isHostApi: !1,retry: 500,history: {},options: {}},cache: {}}, r = {public: {close: function(n) {
                var r = {}, t;
                if (!n || n === "*") {
                    for (t in i.cache)
                        i.cache[t].isHostApi && i.cache[t].stream.close();
                    return i.cache = {}
                }
                for (t in i.cache)
                    n !== t ? r[t] = i.cache[t] : i.cache[t].isHostApi && i.cache[t].stream.close();
                return i.cache = r
            },streams: function(n) {
                return !n || n === "*" ? i.cache : i.cache[n] || {}
            }},_private: {openEventSource: function(t) {
                var r = t.label;
                return i.cache[r].stream.addEventListener("open", function(n) {
                    i.cache[r] && (this.label = r, i.cache[r].options.open.call(this, n))
                }, !1), i.cache[r].stream.addEventListener("message", function(t) {
                    var u = [];
                    i.cache[r] && (u[u.length] = n.parseJSON(t.data), this.label = r, i.cache[r].lastEventId = +t.lastEventId, i.cache[r].history[i.cache[r].lastEventId] = u, i.cache[r].options.message.call(this, u[0] ? u[0] : null, {data: u,lastEventId: i.cache[r].lastEventId}, t))
                }, !1), i.cache[r].stream
            },openPollingSource: function(t) {
                var u = t.label, f;
                return i.cache[u] && (f = n.ajax({type: "GET",url: t.url,data: t.data,beforeSend: function() {
                        i.cache[u] && (this.label = u, i.cache[u].options.open.call(this))
                    },success: function(u) {
                        var h, f = t.label, o = [], s = n.map(u.split("\n\n"), function(n) {
                            return !!n && n
                        }), e = 0, l = s.length, a = /retry/, c;
                        if (n.isArray(s))
                            for (e = 0; e < l; e++)
                                s[e] && (a.test(s[e]) && (c = s[e].split("retry: ")).length ? c.length !== 2 || c[0] || (i.cache[f].retry = i.cache[f].options.retry = +c[1]) : (h = s[e].split("data: ")[1], t.dataType === "json" && (h = n.parseJSON(h)), o[o.length] = h));
                        i.cache[f] && (this.label = f, i.cache[f].lastEventId++, i.cache[f].history[i.cache[f].lastEventId] = o, i.cache[f].options.message.call(this, o[0] ? o[0] : null, {data: o,lastEventId: i.cache[f].lastEventId}), setTimeout(function() {
                            r._private.openPollingSource.call(this, t)
                        }, i.cache[f] && i.cache[f].retry || 500))
                    },cache: !1,timeout: 5e4})), f
            }}}, u = t.EventSource ? !0 : !1;
    n.eventsource = function(t) {
        var e, f;
        if (t && !n.isPlainObject(t) && r.public[t])
            return r.public[t](arguments[1] ? arguments[1] : "*");
        if (t.data = t.data && n.isPlainObject(t.data) ? n.param(t.data) : t.data, !t.url || typeof t.url != "string")
            throw new SyntaxError("Not enough arguments: Must provide a url");
        return t.label = t.label ? t.label : t.url + "?" + t.data, f = n.extend({}, i.defaults, t), i.cache[f.label] = {options: f}, e = u ? new EventSource(f.url + (f.data ? "?" + f.data : "")) : r._private.openPollingSource(f), i.cache[f.label] = n.extend({}, i.setup, {stream: e,isHostApi: u,options: f}), u && r._private.openEventSource(f), i.cache
    }, n.each(["close", "streams"], function(t, i) {
        n.eventsource[i] = function(t) {
            return n.eventsource(i, t || "*")
        }
    })
}(jQuery, window), $.bodyMsg = function(n) {
    function r() {
        var o = 20, t = $(window).width(), i = $(window).height(), r = $("#body_message").width(), u = $("#body_message").height(), f = (t - r) / 2, e = (i - u) / 2;
        $("#body_message").css({left: f,top: e})
    }
    var i = {msg: "",megPos: 1,timerOut: -1}, t = $.extend({}, i, n);
    $("#body_message").remove(), $("body").append('<div id="body_message"  style= "position:absolute;" z-index:99999><span>' + t.msg + "</span></div>"), r(t.megPos), t.timerOut == -1 && (t.timerOut = GetReadInfoMinSeconds(t.msg)), setTimeout(function() {
        $("#body_message").fadeOut(function() {
            $("#body_message").remove()
        })
    }, t.timerOut)
}, _alert = window.alert, window.alert = function(n) {
    $.bodyMsg({msg: n,timerOut: GetReadInfoMinSeconds(n, 7e3)})
}, function(n) {
    n.checkBrowser = {browserAgent: function() {
            return navigator.userAgent
        }}, n.isSupport = function(n) {
        return typeof n != "undefined" ? !0 : !1
    }, n.fn.ulCenter = function(t) {
        var r = {thisWidth: 0,averageSize: !0}, i = n.extend({}, r, t);
        return this.each(function() {
            function u() {
                var n = i.thisWidth !== 0 ? i.thisWidth : t.outerWidth(), u = r.outerWidth() * r.length;
                t.css({"margin-left": (n - u) / 2 + "px"})
            }
            var f = n(this), t = f.find("ul:first"), r = t.find("li");
            u(), n(window).resize(function() {
                u()
            })
        })
    }, n.fn.notice = function(t) {
        var r = {heightSet: 30,speed: 600,timer: 5e3,noticeList: ".notice_list:first",prevBtn: "#no_prev",nextBtn: "#no_next"}, i = n.extend({}, r, t);
        return this.each(function() {
            function s() {
                t = t >= u - 1 ? 0 : t + 1, o(t)
            }
            function o(n) {
                f.find("ul:first").stop(!0, !1).animate({marginTop: "-" + i.heightSet * n + "px"})
            }
            var r = n(this), f = r.find(i.noticeList), h = r.find(i.prevBtn), c = r.find(i.nextBtn), u = f.find("ul:first li").length, t = 0, e = null;
            typeof i.heightSet != "number" || i.heightSet <= 0 || typeof i.speed == "number" && typeof i.timer == "number" && (f.find("ul:first").css({height: i.heightSet * u + "px"}), e = setInterval(s, i.timer), r.bind({mouseover: function() {
                    clearInterval(e)
                },mouseout: function() {
                    e = setInterval(s, i.timer)
                }}), h.bind({click: function() {
                    t = t <= 0 ? u - 1 : t - 1, o(t)
                }}), c.bind({click: function() {
                    t = t >= u - 1 ? 0 : t + 1, o(t)
                }}))
        })
    }, n.fn.inputTextHide = function(t) {
        return this.each(function() {
            var i = n(this), r = i.val();
            i.val(t), i.bind({focus: function() {
                    r = i.val(), r == t && i.val("")
                },blur: function() {
                    r = i.val(), (r == "" || r == t) && i.val(t)
                }})
        })
    }, n.fn.columnSet = function(t) {
        var r = {subItem: ".column_item",rows: 2,margin: 10}, i = n.extend({}, r, t);
        return this.each(function() {
            function f(n, t, i, r) {
                var u = t / i - r / 2, f = e % i;
                n.css({float: "left",width: u + "px"}).eq(f).css({float: "right"})
            }
            var r = n(this), u = r.find(i.subItem), e = u.length, t;
            n(this).append('<div class="clear" style="clear:both; height:0px; font-size:0px; line-height:0px; overflow:hidden;"></div>'), t = r.outerWidth(), f(u, t, i.rows, i.margin), n(window).resize(function() {
                t = r.outerWidth(), f(u, t, i.rows, i.margin)
            })
        })
    }, n.dialogContentSet = {showDialogCont: function(t, i, r, u, f, e) {
            n(t).length > 0 ? (n(".dialog:visible").hide(), n(t).show(), this.dialogPos(t), n("#dialog_mask").show(), typeof f == "function" && f(), this.closeFunc(t, u, e)) : alert("指定的栏目不存在。")
        },cureateDialogCont: function(t, i, r, u, f, e, o) {
            var h = "", c;
            h = t !== "" ? t : this.makeName(), n("#" + h).remove(), c = "", c += '<div class="dialog" id="' + h + '" style="width:' + o + 'px;"><div class="dialog_main">', c += '<div class="dialog_header"><h4>' + i + '</h4><div class="dialog_close"><span>关闭</span></div></div>', c += '<div class="dialog_body">' + r + "</div>", c += "</div></div>", n(".dialog:visible").hide(), n("body").append(c), n("#" + h).show(), n("#dialog_mask").show(), this.dialogPos("#" + h), typeof f == "function" && f(), this.closeFunc("#" + h, u, e)
        },makeName: function() {
            var n = "", r = 6, t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz", u = t.length;
            for (i = 0; i < r; i++)
                n += t.charAt(Math.floor(Math.random() * u));
            return n
        },closeFunc: function(t, i, r) {
            n(t).find(".dialog_close:first").on({click: function() {
                    switch (i) {
                        case 0:
                            n.dialogContentSet.hideDialogCont(t, r);
                            break;
                        case 1:
                            n.dialogContentSet.removeDialogCont(t, r);
                            break;
                        default:
                            n.dialogContentSet.hideDialogCont(t, r)
                    }
                    return !1
                }})
        },hideDialogCont: function(t, i) {
            var r = null;
            n(t).addClass("dialog_out"), r = setTimeout(function() {
                n(t).hide().removeClass("dialog_out"), typeof i == "function" && i()
            }, 500), n("#dialog_mask").hide()
        },removeDialogCont: function(t) {
            var i = null;
            n(t).addClass("dialog_out"), i = setTimeout(function() {
                n(t).removeClass("dialog_out").remove(), typeof hideFunc == "function" && hideFunc()
            }, 500), n("#dialog_mask").hide()
        },dialogPos: function(t) {
            n(t).css({left: (n(window).width() - n(t).outerWidth()) / 2 + "px",top: (n(window).height() - n(t).outerHeight()) / 2 + "px"}), n(window).resize(function() {
                n(t).css({left: (n(window).width() - n(t).outerWidth()) / 2 + "px",top: (n(window).height() - n(t).outerHeight()) / 2 + "px"})
            })
        }}, n.dialogCont = function(t) {
        var r = {model: 0,contName: "",title: "弹出栏目",bodyInner: "",hideModel: 0,widthSet: 600,heightSet: 0,callFunc: "",hideFunc: ""}, i = n.extend({}, r, t);
        switch (i.model) {
            case 0:
                n.dialogContentSet.showDialogCont(i.contName, i.title, i.bodyInner, i.hideModel, i.callFunc, i.hideFunc);
                break;
            case 1:
                n.dialogContentSet.cureateDialogCont(i.contName, i.title, i.bodyInner, i.hideModel, i.callFunc, i.hideFunc, i.widthSet, i.heightSet);
                break;
            default:
                n.dialogContentSet.showDialogCont(i.contName, i.title, i.bodyInner, i.hideModel, i.callFunc, i.hideFunc)
        }
        typeof i.callFunc == Function && i.callFunc()
    }, n.dialogConfirm = function(t) {
        var u = {sIconPatch: "images/dialog_confirm_icon/",sTitle: "操作提示",sBody: "",nWidthSet: 300,sIconName: "m_default",callFunc: "",hideFunc: ""}, i = n.extend({}, u, t), r = "";
        r += '<div class="dialog_confirm">', r += '<div class="dialog_confirm_body"><div class="dcb_icon"><img src="' + i.sIconPatch + i.sIconName + '.png" alt="" /></div><div class="dcb_title"><h4>' + i.sTitle + '</h4></div><div class="dcb_body"><p>' + i.sBody + "</p></div></div>", r += '<div class="dialog_confirm_option"><div class="base_button" id="dc_confirm_btn"><button>确认</button></div></div>', r += "</div>", n.dialogContentSet.cureateDialogCont("dialog_confirm", i.sTitle, r, 1, i.fCallFunc, i.fHideFunc, i.nWidthSet, "auto");
        n("#dc_confirm_btn").on({click: function() {
                n.dialogContentSet.removeDialogCont("#dialog_confirm")
            }})
    }, n.fn.iTab = function(t) {
        var r = {tabInt: 0,tabNav: ".tab_nav",tabContent: ".tab_content",tabContentItem: ".tab_content_item",func: function() {
            }}, i = n.extend({}, r, t);
        return this.each(function() {
            function f(n) {
                u.find("ul:first li").removeClass("current").eq(n).addClass("current"), o.hide().eq(n).show(), typeof i.func == "function" && i.func(n)
            }
            var r = n(this), u = r.find(i.tabNav), e = r.find(i.tabContent), o = e.find(i.tabContentItem), t = i.tabInt;
            f(t), u.find("ul:first li").each(function() {
                n(this).on({click: function() {
                        return t = n(this).index(), f(t), !1
                    }})
            })
        })
    }, n.iSelectFunc = {createIselect: function(t, r) {
            var s = t.find("label:first"), f = t.find("select:first"), o = s.outerWidth(), e, l;
            o = o <= 0 ? 40 : o + 10, e = f.outerWidth(), e = e <= 0 ? 120 : e + 10;
            var v = e + o, p = f.find("optgroup").length, y = f.find("option").length, a = f.find("option:selected").index(), w = 0;
            if (f.length <= 0 || t.find(".i_select_item").length > 0)
                return !1;
            var u = "", h = "", c = "";
            for (i = 0; i < y; i++)
                l = f.find("option").eq(i).text(), h += i == a ? '<li class="selected">' + l + "</li>" : "<li>" + l + "</li>";
            c = f.find("option").eq(a).text(), s.length > 0 ? (u += '<div class="i_select_item" style="width:' + v + 'px">', u += '<div class="left i_select_title" style="width:' + o + 'px">' + s.text() + "</div>", u += '<div class="right i_select_input" style="width:' + e + 'px">', u += '<div class="i_select_handle"><span>' + c + "</span><em></em></div>", u += '<div class="i_select_option"><ol>' + h + "</ol></div>", u += "</div>", u += '<div class="clear"></div>', u += "</div>") : (u += '<div class="i_select_item" style="width:' + e + 'px">', u += '<div class="i_select_input" style="width:' + e + 'px">', u += '<div class="i_select_handle"><span>' + c + "</span><em></em></div>", u += '<div class="i_select_option"><ol>' + h + "</ol></div>", u += "</div>", u += "</div>"), t.append(u), s.hide(), f.hide(), n.iSelectFunc.iSelectOption(t, f, r)
        },iSelectOption: function(t, i, r) {
            var e = t.find(".i_select_handle:first"), u = t.find(".i_select_option:first"), o = u.find("ol:first li"), s = "", f = 0;
            e.on("click", function() {
                n(".i_select_option").hide(), u.is(":visible") ? u.hide() : (u.show(), u.outerHeight() > 200 && u.css({height: "200px",overflow: "auto"}))
            });
            o.each(function() {
                n(this).on({mouseover: function() {
                        n(this).addClass("hover")
                    },mouseout: function() {
                        n(this).removeClass("hover")
                    },click: function() {
                        s = n(this).text(), f = n(this).index(), o.removeClass("selected").eq(f).addClass("selected"), i.find("option").attr("selected", !1).eq(f).attr("selected", !0), e.find("span:first").text(s);
                        var t = i.find("option").eq(f).val();
                        u.hide(), r(t)
                    }})
            }), n(document).bind("click", function(t) {
                var i = n(t.target);
                i.closest(".i_select_item").length == 0 && n(".i_select_option:visible").hide()
            })
        }}, n.fn.iSelect = function(t) {
        var i = {iSelectFunction: function() {
                return
            }}, r = n.extend({}, i, t);
        return this.each(function() {
            var t = n(this);
            n.iSelectFunc.createIselect(t, r.iSelectFunction)
        })
    }, n.fn.mediaAudio = function(t) {
        var r = {isBetting: !1,fileName: "",hidePanle: !0,loopInt: 0,autoCancel: !0,backFunc: ""}, i = n.extend({}, r, t);
        return this.each(function() {
            var t = n("#buzzer").get(0);
            if (t.volume = 1, n(t).find("source").eq(0).attr("src", "images/media/" + i.fileName + ".ogg"), n(t).find("source").eq(1).attr("src", "/images/media/" + i.fileName + ".mp3"), t.load(), i.loopInt !== "" && i.loopInt !== 0) {
                var h = 0, f = null, r = i.fileName, o = r.indexOf("_") + 1, s = r.length, e = r.substring(o, s), c = e * i.loopInt, u = 0;
                f = setInterval(function() {
                    var n = i.isBetting && ctx.bettingNoMediaSound == 1;
                    n || (t.play(), t.currentTime = 0), u = u + 1, u >= i.loopInt && (clearInterval(f), typeof i.backFunc == "function" && i.backFunc())
                }, e)
            } else
                t.play(), n(t).bind("ended", function() {
                    t.currentTime = 0, t.pause(), typeof i.backFunc == "function" && i.backFunc()
                })
        })
    }, n.systemMessageFunc = {modelBase: function() {
            var t = n("#system_msg"), r = n("#system_msg_locker"), u = n("#system_msg_locker em:first"), i = t.find(".sm_header:first"), f = i.find(".sm_statc:first span:first"), e = i.find(".sm_statc:first span:last"), o = i.find(".sm_title:first ul:first"), s = t.find(".sm_body:first"), h = n("#sm_read"), c = t.find(".sm_option"), l = n("#sm_prev"), a = n("#sm_next");
            return [t, r, u, i, f, e, o, s, h, c, l, a]
        },newMessage: function() {
            setTimeout(function() {
                n.systemMessageFunc.showMessage()
            }, 1800), n("#buzzer").mediaAudio({fileName: "message_1800"})
        },loadMessage: function(n) {
            var t = this.modelBase(), i = t[0].outerHeight(), r = t[1].outerWidth();
            switch (n) {
                case 0:
                    t[0].hide().css({bottom: "-" + i + "px"}), t[1].show().css({left: "0px"});
                    break;
                case 1:
                    t[0].hide().css({bottom: "20px"}), t[1].show().css({left: "-" + r + "px"});
                    break;
                default:
                    t[0].hide().css({bottom: "-" + i + "px"}), t[1].show().css({left: "0px"})
            }
            this.messageControls()
        },messageControls: function() {
            var t = this.modelBase();
            n.systemMessageFunc.closeMessage(), n.systemMessageFunc.scanMessage(), n.systemMessageFunc.messageSideStatc(t)
        },messageSideStatc: function(t) {
            t[1].bind({click: function() {
                    n.systemMessageFunc.showMessage(), n.cookie("msg_statc", 1)
                }})
        },messageSet: function() {
            var n = this.modelBase(), t = n[0].outerHeight(), i = n[1].outerWidth();
            n[0].css({bottom: "-" + t + "px"}).hide(), n[1].css({left: "-" + i + "px"}).hide()
        },showMessage: function() {
            var t = this.modelBase(), i = t[0].outerHeight(), r = t[1].outerWidth();
            t[1].stop(!0, !0).fadeOut().dequeue().animate({left: "-" + i + "px"}, function() {
                t[0].stop(!0, !0).fadeIn().dequeue().animate({bottom: "20px"}), n.cookie("msg_statc", 1)
            }), this.messageControls()
        },hideMessage: function() {
            var t = this.modelBase(), i = t[0].outerHeight();
            t[0].stop(!0, !1).fadeOut().dequeue().animate({bottom: "-" + i + "px"}, function() {
                t[1].stop(!0, !1).animate({left: "0px"}).dequeue().fadeIn(), n.cookie("msg_statc", 0)
            })
        },closeMessage: function() {
            var t = this.modelBase();
            t[3].find(".close:first").unbind().bind({click: function() {
                    n.systemMessageFunc.hideMessage(t)
                }})
        },removeMessage: function() {
            var n = this.modelBase(), t = n[0].outerHeight(), i = n[1].outerWidth();
            n[0].stop(!0, !1).fadeOut().dequeue().animate({bottom: "-" + t + "px"}, function() {
                n[1].stop(!0, !1).hide().css({left: "-" + i + "px"})
            }), n[2].text("0"), n[4].text("0"), n[5].text("0")
        },flipMessage: function(n) {
            var t = this.modelBase();
            t[4].text(n), t[6].find("li").hide().eq(n - 1).show(), t[7].find(".sm_item").hide().eq(n - 1).show()
        },scanMessage: function() {
            var t = this.modelBase(), i = parseInt(t[4].text()), r = n.localStorage.getItem("sysMsgKeyIndex" + n("#UserId").val()).split(",").length;
            t[10].unbind(), t[11].unbind(), r <= 1 ? t[10].hide() : t[10].show(), i >= r && t[11].hide(), t[10].bind({click: function() {
                    i <= 2 ? (i = 1, n(this).hide()) : i = i - 1, t[11].show(), n.systemMessageFunc.flipMessage(i)
                }}), t[11].bind({click: function() {
                    i >= r - 1 && n(this).hide(), i = i + 1, t[10].show(), n.systemMessageFunc.flipMessage(i)
                }})
        }}, n.localStorage = {getLength: function() {
            return window.localStorage.length
        },setItem: function(n, t) {
            window.localStorage.setItem(n, t)
        },getItem: function(n) {
            return window.localStorage.getItem(n)
        },deleteItem: function(n) {
            window.localStorage.removeItem(n)
        },clear: function() {
            window.localStorage.clear()
        }}, n.strCode = {toEsCape: function(n) {
            return n = n.toString(), escape(n)
        },unEsCape: function(n) {
            return unescape(n)
        },charCode: function(n) {
            var i, t;
            for (n = n.toString(), i = "", t = 0; t < n.length; t++)
                i += t >= n.length - 1 ? n.charCodeAt(t) : n.charCodeAt(t) + ",";
            return i
        },unCharCode: function(n) {
            var i = "", t;
            for (n = n.split(","), t = 0; t < n.length; t++)
                i += String.fromCharCode(n[t]);
            return i
        }}, String.prototype.IsPassStrong = function() {
        return this.length <= 6 ? !1 : this.match(/^\d+$/) ? !1 : this.match(/^[A-Za-z]+$/) ? !1 : !0
    }, n.fn.passStrength = function(t) {
        return this.each(function() {
            function r(n) {
                f.removeClass(), u.find("ul:first li:lt(" + (n + 1) + ")").addClass(s[n]), f.eq(n).addClass("current")
            }
            var e = n(this), u = n(t), f = u.find(".ps_step ul li"), o = 0, s = ["ps_model_a", "ps_model_b", "ps_model_c"], i = "";
            r(o), e.bind({keyup: function() {
                    i = n(this).val(), i.length <= 6 ? r(0) : i.match(/^\d+$/) ? r(0) : i.match(/^[A-Za-z]+$/) ? r(0) : i.match(/^\w+$/) ? r(1) : i.match(/^\W+$/) ? r(1) : i.match(/^\w+\W+[\w\W]*\w+$/) && r(2)
                }})
        })
    }, n.copyToClipboard = function(t) {
        var r = {sText: "",sSuccessTips: "复制到剪贴板成功！",sFailTips: "复制到剪贴板失败，请手动使用Ctrl+C复制！",sErrorTips: "您的浏览器安全设置不建议执行剪贴板操作，请手动使用Ctrl+C复制"}, i = n.extend({}, r, t);
        if (i.sText !== "")
            window.clipboardData ? (window.clipboardData.setData("Text", i.sText), alert(i.sSuccessTips)) : window.prompt ? window.prompt(i.sErrorTips, i.sText) : alert(i.sFailTips);
        else
            return !1
    }, n.fixTips = function(t) {
        function h(t, i, e, o, s, h, v) {
            var w = "", p = "", b, k;
            if (p = t !== "" ? t : a(), b = 0, k = 0, b = o !== 0 ? o - 20 : "auto", k = s !== 0 ? s - 20 : "auto", w += '<div class="fix_tips" id="' + p + '" style="width:' + b + "; height:" + k + ";left:" + h + "px; top:" + v + 'px;" title="提示消息">', w += "<span>" + i + "</span>", e && (w += "<em>关闭</em>"), w += "</div>", n("body").append(w), e)
                l(n("#" + p));
            else
                switch (u) {
                    case 0:
                        f(n("#" + p));
                        break;
                    case 1:
                        c(n("#" + p), r.nTimer);
                        break;
                    default:
                        f(n("#" + p))
                }
            typeof r.fCallFunc == "function" && r.fCallFunc()
        }
        function f(n) {
            n.remove(), typeof r.fHideFunc == "function" && r.fHideFunc()
        }
        function e(n) {
            n.stop(!0, !1).fadeOut(function() {
                n.remove(), typeof r.fHideFunc == "function" && r.fHideFunc()
            })
        }
        function c(n, t) {
            setTimeout(function() {
                e(n)
            }, t)
        }
        function l(n) {
            n.find("em:first").on({click: function() {
                    e(n)
                }})
        }
        function a() {
            var n = "", r = 6, t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz", u = t.length;
            for (i = 0; i < r; i++)
                n += t.charAt(Math.floor(Math.random() * u));
            return n
        }
        var o = {sTipsName: "",sTipsText: "",nLeftSet: 0,nTopSet: 0,nWidthSet: 0,nHeightSet: 0,nTimer: 3e3,bAutoHide: !1,iArrowPos: 0,bCanClose: !1,fCallFunc: "",fHideFunc: ""}, r = n.extend({}, o, t), u, s;
        if (r.sTipsText !== "")
            u = null, u = r.bAutoHide ? 0 : 1, s = h(r.sTipsName, r.sTipsText, r.bCanClose, r.nWidthSet, r.nHeightSet, r.nLeftSet, r.nTopSet, r.iArrowPos);
        else
            return !1
    }, n.fn.formMesg = function(t, i) {
        return this.each(function() {
            var r = n(this), u = "";
            switch (t) {
                case 0:
                    u = '<div class="form_msg fm_error"><span>' + i + "</span></div>";
                    break;
                case 1:
                    u = '<div class="form_msg fm_ok"><span>' + i + "</span></div>";
                    break;
                default:
                    return !1
            }
            r.find(".form_msg") && r.find(".form_msg").remove(), r.append(u), n(".form_msg").show(), n(document).bind({keydown: function() {
                    r.find(".form_msg").remove()
                }})
        })
    }, n.stringOption = {isNumberString: function(n) {
            return /^\d+$/.test(n)
        },isURL: function(n) {
            return /^http:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/.test(n)
        },isEnglish: function(n) {
            return /^[A-Za-z]+$/.test(n)
        },isMail: function(n) {
            return /^(?:[\w-]+\.?)*[\w-]+@(?:[\w-]+\.)+[\w]{2,3}$/.test(n)
        },isTel: function(n) {
            return /^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/.test(n)
        },isMobile: function(n) {
            return /^1[358]\d{9}$/.test(n)
        },isZipCode: function(n) {
            return /^(\d){6}$/.test(n)
        },isIDCard: function(n) {
            var r = function(n) {
                var t = n.substring(0, 6) + "19" + n.substring(6, 15), u = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"], f = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2], r = 0;
                for (i = 0; i < t.length; i++)
                    r += t.substring(i, i + 1) * f[i];
                return r %= 11, t += u[r]
            }, t = function(n) {
                var e = {11: "北京",12: "天津",13: "河北",14: "山西",15: "内蒙古",21: "辽宁",22: "吉林",23: "黑龙江",31: "上海",32: "江苏",33: "浙江",34: "安徽",35: "福建",36: "江西",37: "山东",41: "河南",42: "湖北",43: "湖南",44: "广东",45: "广西",46: "海南",50: "重庆",51: "四川",52: "贵州",53: "云南",54: "西藏",61: "陕西",62: "甘肃",63: "青海",64: "宁夏",65: "新疆",71: "台湾",81: "香港",82: "澳门",91: "国外"}, f = 0, o = "", t = n, u, r, i;
                if (!/^\d{17}(\d|x)$/i.test(t) || (t = t.replace(/x$/i, "a"), e[parseInt(t.substr(0, 2))] == null) || (u = t.substr(6, 4) + "-" + Number(t.substr(10, 2)) + "-" + Number(t.substr(12, 2)), r = new Date(u.replace(/-/g, "/")), u != r.getFullYear() + "-" + (r.getMonth() + 1) + "-" + r.getDate()))
                    return !1;
                for (i = 17; i >= 0; i--)
                    f += Math.pow(2, i) % 11 * parseInt(t.charAt(17 - i), 11);
                return f % 11 != 1 ? !1 : !0
            };
            return n.length == 15 ? t(r(n)) : t(n)
        },getChineseNum: function(n) {
            return n.length - n.replace(/[\u4e00-\u9fa5]/g, "").length
        },trimLeft: function(n) {
            return n.replace(/^\s+/, "")
        },trimRight: function(n) {
            return n.replace(/\s+$/, "")
        },trim: function(n) {
            return this.trimRight(this.trimLeft(n))
        }}, n.fn.relCenter = function(t) {
        var r = {offset: [0, 0],scrollFix: !1,scrollAni: !1,speed: 600,easing: "linear"}, i = n.extend({}, r, t);
        return this.each(function() {
            function o() {
                i.scrollFix ? r.css({left: f + "px",top: e + "px"}) : r.css({left: f + "px",top: e + "px"})
            }
            var r = n(this), t = [n(window).width(), n(window).height()], u = [r.outerWidth(), r.outerHeight()], f = (t[0] - (u[0] + i.offset[0] * 2)) / 2, e = (t[1] - (u[1] + i.offset[1] * 2)) / 2;
            o(), n(window).resize(function() {
                t = [n(window).width(), n(window).height()], f = (t[0] - (u[0] + i.offset[0] * 2)) / 2, e = (t[1] - (u[1] + i.offset[1] * 2)) / 2, o()
            })
        })
    }, n.iStorage = {isSupport: function() {
            return typeof localStorage != "undefined" ? !0 : !1
        },getOne: function(n) {
            return this.isSupport ? this.hasKey(n) ? localStorage.getItem(n) : !1 : !1
        },insert: function(t, i) {
            if (!this.isSupport)
                return !1;
            if (n.isArray(t))
                for (var r = 0; r < i.length; r++)
                    localStorage.setItem(t[r], i[r]);
            else
                localStorage.setItem(t, i)
        },deleteOne: function(n) {
            if (!this.isSupport)
                return !1;
            localStorage.removeItem(n)
        },clear: function() {
            if (!this.isSupport)
                return !1;
            if (confirm("确定清空缓存？"))
                localStorage.clear();
            else
                return !1
        },hasKey: function(n) {
            return this.isSupport ? typeof localStorage.getItem(n) != "undefined" ? !0 : !1 : !1
        }}, n.fn.tpwbMarquee = function(t) {
        var r = {direction: "x",speed: 5,subWidth: 0,subHeight: 0,loop: !0,noGap: !0}, i = n.extend({}, r, t);
        return this.each(function() {
            function p() {
                if (i.noGap) {
                    var u = t.clone();
                    t.after(u);
                    switch (r) {
                        case "x":
                            t.css({width: o * h + "px",height: s + "px"});
                            break;
                        case "y":
                            t.css({width: o + "px",height: s * h + "px"});
                            break;
                        default:
                            t.css({width: o * h + "px",height: s + "px"})
                    }
                } else
                    switch (r) {
                        case "x":
                            t.css({width: o * h + "px",height: s + "px"});
                            break;
                        case "y":
                            t.css({width: o + "px",height: s * h + "px"});
                            break;
                        default:
                            t.css({width: o * h + "px",height: s + "px"})
                    }
                switch (r) {
                    case "x":
                        f = setInterval(l, e), c.bind({mouseenter: function() {
                                clearInterval(f), n(".tpwb_marquee_shadow").fadeOut()
                            },mouseleave: function() {
                                f = setInterval(l, e), n(".tpwb_marquee_shadow").fadeIn()
                            }});
                        break;
                    case "y":
                        f = setInterval(v, e), c.bind({mouseenter: function() {
                                clearInterval(f), n(".tpwb_marquee_shadow").fadeOut()
                            },mouseleave: function() {
                                f = setInterval(v, e), n(".tpwb_marquee_shadow").fadeIn()
                            }});
                        break;
                    default:
                        f = setInterval(l, e), c.bind({mouseenter: function() {
                                clearInterval(f), n(".tpwb_marquee_shadow").fadeOut()
                            },mouseleave: function() {
                                f = setInterval(l, e), n(".tpwb_marquee_shadow").fadeIn()
                            }})
                }
            }
            function l() {
                u = u <= t.width() ? u + 1 : 0, t.css({"margin-left": "-" + u + "px"})
            }
            function v() {
                u = u <= t.height() ? u + 1 : 0, t.css({"margin-top": "-" + u + "px"})
            }
            var c = n(this), e = i.speed, r, o, s;
            e = e * 10, r = i.direction, r = r.toLocaleLowerCase(), r = r.replace(/\s\d/g, ""), r == "" && (r = "x");
            var f = null, y = c.find(".tpwb_marquee_list:first"), t = y.find("table:first"), a = t.find("tr"), h = a.length, u = 0;
            o = i.subWidth !== 0 ? i.subWidth : a.outerWidth(!0), s = i.marqueeSubHeight !== 0 ? i.marqueeSubHeight : a.outerHeight(!0), p()
        })
    }, n.fn.tpAccordion = function() {
        return this.each(function() {
            var t = n(this), i = t.find(".accordion_header:first"), r = t.find(".accordion_body:first");
            i.bind({click: function() {
                    r.slideToggle()
                }})
        })
    }, n.tpwbFixController = {options: {autoShow: !1,flip: "display",speed: 300,axis: "y",easing: "linear",offset: 20,classSet: {fixcontroller: "",controller: "",closeBtn: ""},callBack: {beforeInit: function() {
                },afterInit: function() {
                },beforeShow: function() {
                },afterShow: function() {
                },beforeHide: function() {
                },afterHide: function() {
                }}},_init: function(t, i) {
            var u = this, r = {};
            return i.callBack.beforeInit(), r.options = i, r.cItem = t, r.isShow = !1, r.itemCss = {}, r.itemCss.width = r.cItem.outerWidth(), r.itemCss.height = r.cItem.outerHeight(), r.itemCss.left = r.cItem.css("margin-left"), r.itemCss.top = r.cItem.css("margin-top"), r.fixcontroller = n("#fixcontroller")[0] ? n("#fixcontroller") : n("<div>").addClass("full_width fixed " + i.classSet.fixcontroller).attr("id", "fixcontroller").css({display: "none"}).appendTo("body"), r.controller = n("<div>").addClass("controller_item " + i.classSet.controller).css({width: r.itemCss.width + "px",height: r.itemCss.height + "px",left: r.itemCss.left,top: r.itemCss.top,display: "none"}).appendTo(r.fixcontroller), r.cItem.css({margin: "0px"}).appendTo(r.controller), r.closeBtn = n('<div><a href="javascript:void(0);">关闭</a></div>').addClass("close " + i.classSet.closeBtn).appendTo(r.controller), r.controller.bind({show: function() {
                    u._show(r)
                },hide: function() {
                    u._hide(r)
                },toggle: function() {
                    r.isShow ? u._hide(r) : u._show(r)
                }}), r.closeBtn.bind({click: function() {
                    u._hide(r)
                }}), i.autoShow && r.controller.trigger("show"), i.callBack.afterInit(r), r
        },_show: function(n) {
            var i = this, t = n.options;
            if (!n.isShow) {
                n.isShow = !0;
                switch (t.flip) {
                    case "slide":
                        i._slide(n, !0);
                        break;
                    case "fade":
                        t.callBack.beforeShow(n), n.fixcontroller.show(), n.controller.fadeIn(t.speed, function() {
                            t.callBack.afterShow(n)
                        });
                        break;
                    case "display":
                    default:
                        t.callBack.beforeShow(n), n.fixcontroller.show(), n.controller.show(), t.callBack.afterShow(n)
                }
            }
        },_hide: function(n) {
            var i = this, t = n.options;
            if (n.isShow) {
                n.isShow = !1;
                switch (t.flip) {
                    case "slide":
                        i._slide(n, !1);
                        break;
                    case "fade":
                        t.callBack.beforeHide(n), n.fixcontroller.hide(), n.controller.fadeOut(t.speed, function() {
                            t.callBack.afterHide(n)
                        });
                        break;
                    case "display":
                    default:
                        t.callBack.beforeHide(n), n.fixcontroller.hide(), n.controller.hide(), t.callBack.afterHide(n)
                }
            }
        },_slide: function(n, t) {
            var r = {}, i = n.options;
            if (r.fcSize = {w: n.fixcontroller.width(),h: n.fixcontroller.height()}, r.cSize = {w: n.controller.outerWidth(),h: n.controller.outerHeight()}, t) {
                n.fixcontroller.show();
                switch (i.axis) {
                    case "x":
                        i.callBack.beforeShow(n), n.controller.css({left: "-" + parseInt(r.cSize.w + i.offset) + "px"}).stop(!0, !1).fadeIn().dequeue().animate({left: n.itemCss.left}, i.speed, i.easing, function() {
                            i.callBack.afterShow(n)
                        });
                        break;
                    case "y":
                    default:
                        i.callBack.beforeShow(n), n.controller.css({top: "-" + parseInt(r.cSize.h + i.offset) + "px"}).stop(!0, !1).fadeIn().dequeue().animate({top: n.itemCss.top}, i.speed, i.easing, function() {
                            i.callBack.afterShow(n)
                        })
                }
            } else
                switch (i.axis) {
                    case "x":
                        i.callBack.beforeHide(n), n.controller.stop(!0, !1).fadeOut().dequeue().animate({left: parseInt(r.fcSize.w + i.offset) + "px"}, i.speed, i.easing, function() {
                            n.fixcontroller.hide(), i.callBack.afterHide(n)
                        });
                        break;
                    case "y":
                    default:
                        i.callBack.beforeHide(n), n.controller.stop(!0, !1).fadeOut().dequeue().animate({top: parseInt(r.fcSize.h + i.offset) + "px"}, i.speed, i.easing, function() {
                            n.fixcontroller.hide(), i.callBack.afterHide(n)
                        })
                }
        }}, n.fn.tpwbFixController = function(t) {
        return this.each(function() {
            var u = n(this), r = null, i = u.data("fixcontroller") !== "undefined" ? u.data("fixcontroller") : !1;
            r = i ? i.options : typeof t == "string" ? n.tpwbFixController.options : n.extend(!0, {}, n.tpwbFixController.options, t), typeof t == "string" ? i.controller.trigger(t) : i = n.tpwbFixController._init(u, r), u.data("fixcontroller", i)
        })
    }, n.fn.tpwbFocusText = function(t) {
        var r = {baseText: "",baseColor: "#999999",focusColor: "#666666"}, i = n.extend(!0, {}, r, t);
        return this.each(function() {
            function r(n) {
                var r = t.val();
                switch (n) {
                    case 0:
                        r !== "" && r !== i.baseText ? t.css({color: i.focusColor}) : t.val(i.baseText).css({color: i.baseColor});
                        break;
                    case 1:
                        r !== "" && r !== i.baseText ? t.css({color: i.focusColor}) : t.val("").css({color: i.focusColor});
                        break;
                    default:
                        return !1
                }
            }
            var t = n(this);
            if (parseInt(i.baseText) == 0)
                return !1;
            r(0);
            t.on({focus: function() {
                    r(1)
                },blur: function() {
                    r(0)
                }})
        })
    }, n.fn.toggleList = function() {
        return this.each(function() {
            var u = n(this), r = u.find(".item"), f = r.find(".tli_header:first"), t = r.find(".tli_content:first"), i = null;
            f.on({click: function(r) {
                    r.preventDefault() && r.preventDefault, i = n(this).parent(".item"), t = n(this).siblings(".tli_content:first"), t.is(":visible") ? (i.removeClass("current"), t.stop(!0, !1).slideUp()) : (i.addClass("current"), t.stop(!0, !1).slideDown())
                }})
        })
    }, n.fn.relCenters = function(t) {
        var i = n.extend(!0, {}, {axis: "all",parent: window,offset: 0}, t);
        return this.each(function() {
            function s(n, i, u, f) {
                switch (n) {
                    case "all":
                        r == "absolute" || r == "fixed" ? t.css({left: (u[0] - i[0]) / 2 - (f[1] + f[3]) + "px",top: (u[1] - i[1]) / 2 - (f[0] + f[2]) + "px"}) : t.css({"margin-left": (u[0] - i[0]) / 2 - (f[1] + f[3]) + "px","margin-top": (u[1] - i[1]) / 2 - (f[0] + f[2]) + "px"});
                        break;
                    case "x":
                        r == "absolute" || r == "fixed" ? t.css({left: (u[0] - i[0]) / 2 - (f[1] + f[3]) + "px"}) : t.css({"margin-left": (u[0] - i[0]) / 2 - (f[1] + f[3]) + "px"});
                        break;
                    case "y":
                        r == "absolute" || r == "fixed" ? t.css({top: (u[1] - i[1]) / 2 - (f[0] + f[2]) + "px"}) : t.css({"margin-top": (u[1] - i[1]) / 2 - (f[0] + f[2]) + "px"});
                        break;
                    default:
                        r == "absolute" || r == "fixed" ? t.css({left: (u[0] - i[0]) / 2 - (f[1] + f[3]) + "px",top: (u[1] - i[1]) / 2 - (f[0] + f[2]) + "px"}) : t.css({"margin-left": (u[0] - i[0]) / 2 - (f[1] + f[3]) + "px","margin-top": (u[1] - i[1]) / 2 - (f[0] + f[2]) + "px"})
                }
            }
            function h(t) {
                var r = [], i;
                if (n.isArray(t))
                    r = t;
                else
                    for (t = parseInt(t) == "NaN" ? 0 : parseInt(t), i = 0; i < 4; i++)
                        r[i] = t;
                return r
            }
            var t = n(this), f = h(i.offset), e = [t.outerWidth(), t.outerHeight()], u = u == window ? n(window) : t.parent(), o = [u.width(), u.height()], r = t.css("position");
            s(i.axis, e, o, f), u.bind({resize: function() {
                    parSize = [u.width(), u.height()], s(i.axis, e, o, f)
                }})
        })
    }
}(jQuery), $(window).load(function() {
    $.novice(), $.activity(), $("#base_loading").hide(), $.datepicker.regional["zh-CN"] = {closeText: "关闭",prevText: "上月",nextText: "下月",currentText: "今天",monthNames: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],monthNamesShort: ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二"],dayNames: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],dayNamesShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],dayNamesMin: ["日", "一", "二", "三", "四", "五", "六"],weekHeader: "周",dateFormat: "yy-mm-dd",firstDay: 1,isRTL: !1,showMonthAfterYear: !0,yearSuffix: "年"}, $.datepicker.setDefaults($.datepicker.regional["zh-CN"]), setTimeout(function() {
        LoadNewMessage()
    }, 0)
}), $(document).ready(function() {
    function r(n) {
        var r, t, i;
        n == 0 || (n == 1 ? (t = "index.php?ac=OrderList", r = "recharge", $("#withdraw_withdrawList").html(""), i = {partial: 1,type: r,status: "所有",pageSize: 5,objId: "recharge_rechargeList"}, GetPageData(t, i, $("#recharge_rechargeList"))) : n == 2 ? (t = "index.php?ac=ErrorList", $("#withdraw_withdrawList").html(""), i = {partial: 1}, GetPageData(t, i, $("#error_rechargeList"))) : n == 3 && (t = "index.php?ac=ThirdList", $("#withdraw_withdrawList").html(""), i = {partial: 1}, GetPageData(t, i, $("#third_rechargeList"))))
    }
    function u(n) {
        var t, i, r;
        n == 0 || n == 1 && (t = "index.php?ac=OrderList", i = "withdraw", $("#recharge_rechargeList").html(""), $("#error_rechargeList").html(""), $("#third_rechargeList").html(""), r = {partial: 1,type: i,status: "所有",pageSize: 5,objId: "withdraw_withdrawList"}, GetPageData(t, r, $("#withdraw_withdrawList")))
    }
    function f(n) {
        n == 0 ? ctx.postJSON("index.php?ac=member&op=GetUserInfo", {}, function(n) {
            $("#UserInfoTitle").html(n.username), $("#UserInfoType").html(n.type==0?'会员':'代理'), $("#UserInfoLastLogonTime").html(n.updateTime), $("#UserInfoEmail").html(n.email), $("#UserInfoLastLoginIp").html(n.LastLoginIp)
        }) : n == 1 || n == 2
    }
    function i() {
        ctx.userPaymentType ? (ctx.userPaymentType != "1002" ? ($("#divBankInfoPayType").html("<spn>" + ctx.userPaymentTypeName + "</span>"), $(".gs").css("display", "block"), $(".cft").css("display", "none")) : ctx.userPaymentType == "1002" && ($("#divBankInfoPayType").html("<spn>" + ctx.userPaymentTypeName + "</span>"), $(".gs").css("display", "none"), $(".cft").css("display", "block")), $("#divBankInfoUserName").html("<spn>" + ctx.userAccName + "</span>"), $("#divBankInfoNum").html("<spn>" + ctx.userAccNo + "</span>"), $(".readOnlyBankInfo").hide()) : $(".readOnlyBankInfo").show()
    }
    var t, n;
    $(".vip-show:first").bind({click: function() {
            $.dialogCont({contName: "#vip_base"})
        }}), $("#open_vip").bind({click: function() {
            hasRealName || $.dialogCont({contName: "#vip_shenqing"})
        }}), $("#compre_vip").bind({click: function() {
            $.dialogCont({contName: "#vip_grid"})
        }}), $("#packs_handle").bind({click: function() {
            $.dialogCont({contName: "#vip_base"}), ctx.postTokenEx({url: "/Home/UpdateVIPLevel",data: {},complete: function() {
                },success: function(n) {
                    n == "suc" ? ($("#packs_handle").hide(), msgTip($("#vip_base:first"), "您已经成功获得一个VIP礼包，请刷新页面更新VIP等级", "changed_error", 70, 120)) : msgTip($("#vip_base:first"), "请点击填写您'开通VIP'的联系方式！", "changed_error", 70, 120)
                }})
        }}), $(".accordion_item").tpAccordion(), $(".base_select").iSelect(), $("#wrap").css({height: $(window).height() - 40}), $(window).resize(function() {
        $("#wrap").css({height: $(window).height() - 40})
    }), $.frameResize(), $("#login_out").bind({click: function() {
            return confirm("您确定要退出吗？") && (window.location.href = "index.php?ac=login&op=logout"), !1
        }}), $(".nav>ul>li").click(function() {
        this.id != "recharge_option" && this.id != "withdraw_option" && this.id != "userinfo_option" && ($(".nav>ul>li").removeClass("current"), $(this).addClass("current"))
    }), $("#side_tag ul li").each(function(n) {
        $(this).css({zIndex: 9 * n})
    }), $("#side_tag>ul>li").die("click").live("click", function() {
        $("#side_tag>ul>li").removeClass("current"), $(this).addClass("current")
    }), t = null, t = setInterval(function() {
        $("#timer ul:first").mClock()
    }, 1e3), $(".base_tab").iTab(), $("#side_tag ul:first li.formalPlay").live({mouseenter: function() {
            $(this).append('<em class="st_remove" title="移除">移除</em>')
        },mouseleave: function() {
            $(this).find("em.st_remove").remove()
        }}), $("#side_tag ul:first li em.st_remove").live({click: function() {
            var n = $(this).parent(), t = n.hasClass("current");
            if (confirm("确定要移除这个收藏吗？"))
                n.stop(!0, !1).fadeOut(function() {
                    n.remove(), t && $(".tempCurLottery").addClass("current"), updateUserLeftSideSetting()
                });
            else
                return !1
        }}), $("#recharge_tab").iTab({func: r}), $("#recharge_option").bind({click: function() {
            return ctx.userType == 1 ? (alert("代理商不能充值，请联系管理员！"), !1) : ($.dialogCont({contName: "#recharge"}), $("#recharge_rechargeform").hide(), ctx.userPaymentType != "" && $("#recharge-base").show(), $("#recharge_tab").iTab({tabInt: 0}), $("#recharge_type").is(":visible") && $("#re_load").trigger("click"), !1)
        }}), $("#withdraw_tab").iTab({func: u}), $("#withdraw_option").bind({click: function() {
            return $.dialogCont({contName: "#withdraw"}), $("#withdraw_tab").iTab({tabInt: 0}), GetPageData("index.php?ac=Withdraw", {partial: 1,t: +new Date}, $("#withdrawal_form")), !1
        }}), $("#userinfo_tab").iTab({func: f}), $("#user_image,#userinfo_option").bind({click: function() {
            return $.dialogCont({contName: "#userinfo",hideFunc: function() {
                    $("#pass_form").stop(!0, !1).fadeOut()
                }}), $("#userinfo_tab").iTab({tabInt: 0}), !1
        }}), i(), ctx.userPaymentType == "" && ($("#recharge-base").hide(), $(".withdrawal_form").hide(), $("#withdraw_tips").hide()), $("#bankInfoNum,#conbankInfoNum").keydown(function(n) {
        return $.browser.msie ? event.keyCode > 47 && event.keyCode < 58 || event.keyCode > 95 && event.keyCode < 106 || event.keyCode == 8 ? !0 : !1 : n.which > 47 && n.which < 58 || event.keyCode > 95 && event.keyCode < 106 || n.which == 8 || event.keyCode == 17 ? !0 : !1
    }).focus(function() {
    }), $(".i_select_option ol li").bind({click: function() {
            $(this).html() == "财付通" ? ($(".gs").css("display", "none"), $(".cft").css("display", "block")) : ($(".gs").css("display", "block"), $(".cft").css("display", "none"))
        }}), n = !1, $("#bankInfoSubmit").bind({click: function() {
            var u = $("#bankInfoPayType  option:selected").val(), t = $("#bankInfoNum").val(), s = $("#conbankInfoNum").val(), f = $("#bankInfoUserName").val(), r = $("#bankPassword").val(), h = $("#bankConfirmPassword").val(), e, o;
            if (t.trim() != s.trim())
                return msgTip($("#bankInfoTip:first"), "帐号不一致，请重新输入！！", "changed_error", 70, 120), !1;
            if (u != 3) {
                if (t.trim().length < 16 || t.trim().length > 19)
                    return msgTip($("#bankInfoTip:first"), "账号长度不合法！", "changed_error", 70, 120), !1
            } else if (t.trim().length == 0)
                return msgTip($("#bankInfoTip:first"), "账号不能为空！", "changed_error", 70, 120), !1;
            if (e = /^[\u4e00-\u9fa5]{2,4}$/, !e.test(f.trim()))
                return msgTip($("#bankInfoTip:first"), "开户姓名不合法！", "changed_error", 70, 120), !1;
            if (r.trim().length < 6 || r.trim().length > 16)
                return msgTip($("#bankInfoTip:first"), "密码长度不合法！", "changed_error", 70, 120), !1;
            if (r.trim() != h)
                return msgTip($("#bankInfoTip:first"), "密码不一致,请重新输入！", "changed_error", 70, 120), !1;
            if (!r.trim().IsPassStrong())
                return msgTip($("#bankInfoTip:first"), "密码必须包含字母数字或是特殊符号！", "changed_error", 70, 120), !1;
            if (n)
                return !1;
            $("#bankInfoSubmit").css("cursor", "wait"), n = !0, o = {bankInfoPayType: u,bankInfoNum: t,bankInfoUserName: f,bankPassword: r}, ctx.postTokenEx({url: "index.php?ac=member&op=SetCBAccount",data: o,complete: function() {
                    n = !1, $("#bankInfoSubmit").css("cursor", "pointer")
                },success: function(n) {
                    n == "suc" ? (msgTip($("#bankInfoTip:first"), "修改账户信息成功！", "changed_error", 70, 120), $.dialogContentSet.hideDialogCont("#userinfo"), ctx.userPaymentType = u, ctx.userAccName = f, ctx.userAccNo = t, i(), $("#recharge-base").show(), $(".withdrawal_form").show(), $("#withdraw_tips").show(), $(".recharge_ban_class").remove(), $("#withdrawal_form").html("")) : n == "samePassword" ? msgTip($("#bankInfoTip:first"), "资金密码不能和登录密码一样！", "changed_error", 70, 120) : n == "hasbind" ? msgTip($("#bankInfoTip:first"), "您已经绑定过银行卡，请刷新界面重新操作！", "changed_error", 70, 120) : n == "hasMutiCard" ? msgTip($("#bankInfoTip:first"), "此用户名已被绑定,请联系客服处理 ！", "changed_error", 70, 120) : msgTip($("#bankInfoTip:first"), "设定账户资料失败,请刷新界面后重新操作！", "changed_error", 70, 120)
                }})
        }}), $("#vipClose").bind({click: function() {
            $("#RealName").val(""), $("#TelPhone").val(""), $("#QQ").val(""), $.dialogContentSet.hideDialogCont("#vip_shenqing")
        }}), $("#vipSubmit").bind({click: function() {
            var t = $("#RealName").val(), r = $("#TelPhone").val(), i = $("#QQ").val(), u;
            if (t.trim().length < 2 || t.trim().length > 4)
                return msgTip($("#VipTip:first"), "请填写您的真实姓名！", "changed_error", 70, 120), !1;
            if (!r.match(/^[1][3458]\d{9}$/))
                return msgTip($("#VipTip:first"), "请填写您的联系电话！", "changed_error", 70, 120), !1;
            if (!i.match(/^\d+$/) || i.trim().length > 15)
                return msgTip($("#VipTip:first"), "请输入正确的QQ号码", "changed_error", 70, 120), !1;
            if (n)
                return !1;
            $("#vipSubmit").css("cursor", "wait"), n = !0, u = {RealName: t,TelPhone: r,QQ: i}, ctx.postTokenEx({url: "/Home/UpdateUserInfo",data: u,complete: function() {
                    n = !1, $("#vipSubmit").css("cursor", "pointer")
                },success: function(n) {
                    n == "suc" ? (msgTip($("#VipTip:first"), "填写vip资料成功，请刷新您的页面更新VIP信息！", "changed_error", 70, 120), $("#packs_handle").hide(), setTimeout(function() {
                        $.dialogContentSet.hideDialogCont("#vip_shenqing")
                    }, 2e3)) : n == "0" ? msgTip($("#VipTip:first"), "申请失败，您的累积投注额不够！", "changed_error", 70, 120) : msgTip($("#VipTip:first"), "资料提交失败，请联系客服！", "changed_error", 70, 120)
                }})
        }}), $(".toggle_list").toggleList(), $(".nav-sub-cont").tpwbFixController({flip: "display",classSet: {fixcontroller: "cp_controller"}});
    $("#nav-sub1 a").on({click: function(n) {
            n.preventDefault();
            var t = $(this), i = t.attr("id").substr(3);
            $("#" + i).tpwbFixController("show")
        }});
    $("#bankInfoCancel").bind({click: function() {
            $("#bankInfoNum").val(""), $("#bankInfoUserName").val(""), $("#bankPassword").val(""), $("#bankConfirmPassword").val(""), $.dialogContentSet.hideDialogCont("#userinfo")
        }}), $("#password_set_list span").each(function(n) {
        $(this).bind({click: function() {
                var t = $("#password_set_list span").eq(n).attr("data-form-url");
                $("#password_set_list span").removeClass("current").eq(n).addClass("current"), $("#pass_form input[type=password]").val(""), $("#mmsz").passStrength("#mmsz_ps"), $("#pass_form").stop(!0, !1).fadeIn(function() {
                    switch (n) {
                        case 0:
                            $("#pass_form .arrow:first").stop(!0, !1).animate({left: "102px"}), $.passwordChange({ajaxUrl: t,successTips: "登录密码修改成功，下次登录生效！"});
                            break;
                        case 1:
                            $("#pass_form .arrow:first").stop(!0, !1).animate({left: "316px"}), $.passwordChange({ajaxUrl: t,successTips: "资金密码修改成功！"});
                            break;
                        default:
                            $("#pass_form .arrow:first").stop(!0, !1).animate({left: "102px"}), $.passwordChange({ajaxUrl: t,successTips: "登录密码修改成功，下次登录生效！"})
                    }
                })
            }})
    }), $("#bankPassword").passStrength("#bankPassword_vaild"), $("#mmsz").passStrength("#mmsz_ps"), $(".cancel_order").die("click").live("click", function() {
        if (!confirm("确认撤销该订单？"))
            return !1;
        var n = $(this), t = n.parent().parent(), i = t.find(".orderInfoOrderId").text(), r = t.find(".orderInfoIssueNumber").text(), u = n.attr("lotteryIdValue");
        ctx.postToken("index.php?ac=Betting&op=deleteCode", {orderId: i,issueNumber: r,lotteryId: u}, function(t) {
            refreshGamePoin(), n.closest(".dialog_main").find(".dialog_close").trigger("click"), setTimeout(function() {
                alert(t)
            }, 500);
			$("#firstPage").trigger("click")
        })
    })
}), function(n) {
    n.passwordChange = function(t) {
        var u = {ajaxUrl: "",successTips: "密码修改成功！",errorTips: "密码修改失败，请稍后再试！"}, r = n.extend({}, u, t), i = !1;
        n("#pass_form #submit_change").die().live({click: function() {
                var u = n("#userInfoOldPwd").val(), t = n("#mmsz").val(), f = n("#mmsz2").val(), e;
                if (u.trim().length == 0)
                    return msgTip(n("#pass_form .pass_form_table:first"), "密码不能为空！", "changed_error", 70, 30), !1;
                if (t.trim().length < 6 || t.trim().length > 16)
                    return msgTip(n("#pass_form .pass_form_table:first"), "密码长度不合法！", "changed_error", 70, 30), !1;
                if (t != f)
                    return msgTip(n("#pass_form .pass_form_table:first"), "密码不一致,请重新输入！", "changed_error", 70, 30), !1;
                if (!t.trim().IsPassStrong())
                    return msgTip(n("#pass_form .pass_form_table:first"), "密码必须包含字母数字或是特殊符号！", "changed_error", 70, 30), !1;
                if (i)
                    return !1;
                n("#pass_form #submit_change").css("cursor", "wait"), i = !0, e = {oldPwd: u,newPwd1: t,newPwd2: f,__RequestVerificationToken: n("input[name=__RequestVerificationToken]").val()}, n.ajax({url: r.ajaxUrl,type: "POST",data: e,dataType: "JSON",beforeSend: function() {
                        n(".changed_tips").remove(), n("#pass_form .loading:first").show(), n("#pass_form table:first").hide()
                    },success: function(t) {
                        i = !1, n("#pass_form #submit_change").css("cursor", "pointer"), t == "修改密码成功" ? setTimeout(function() {
                            n("#pass_form .loading:first").hide(), n("#pass_form input[type=password]").val(""), n("#pass_form table:first").show(), n("#pass_form .pass_form_table:first").append('<div class="changed_tips"><span class="changed_ok">' + r.successTips + "</span></div>"), setTimeout(function() {
                                n(".changed_tips").fadeOut(function() {
                                    n(".changed_tips").remove()
                                })
                            }, 2e3)
                        }, 1e3) : (n("#pass_form .loading:first").hide(), n("#pass_form table:first").show(), n("#pass_form .pass_form_table:first").append('<div class="changed_tips"><span class="changed_error">' + t + "</span></div>"), setTimeout(function() {
                            n(".changed_tips").fadeOut(function() {
                                n(".changed_tips").remove()
                            })
                        }, 2e3))
                    }})
            }}), n("#pass_form #chanle_change").bind({click: function() {
                n("#pass_form input[type=password]").val(""), n.dialogContentSet.hideDialogCont("#userinfo")
            }})
    }, n.fn.roundFlip = function(t) {
        var r = {startInt: 0,scaleInt: 2,itemWidth: 250,itemHeight: 250,topMarginInt: 0,marginInt: 20,lockedClass: "round_flip_locked",unLockClass: "round_flip_unlock",flipItem: "ul:first li",prevBtn: ".prev:first",nextBtn: ".next:first",minZ: 90,maxZ: 99,speed: 300,beforeFunc: "",afterFunc: "",afterSlipEx: ""}, i;
        return n.roundFlipFunc = {roundFlipSet: function(n, t, i, r, u, f, e, o, s, h, c, l, a, v, y) {
                var b = n.width(), k = n.height(), ht = i - 1 <= 0 ? t.length - 1 : i - 1, tt = i + 1 >= t.length - 1 ? 0 : i + 1, it = c, rt = l, ut = (b - c) / 2, ft = (k - l) / 2 - h, w = c / f, p = l / f, d = (k - p) / 2 - h, ot = n.outerWidth() - n.width() + s, st = b - w - s, g = 0, nt = 0, et = (b - g) / 2, ct = (k - nt) / 2 - h;
                n.css({position: "relative"}), t.css({position: "absolute"}), t.stop(!0, !1), a(), t.css({"z-index": r / f,width: g,height: nt,left: et,top: ct}).removeClass(o).addClass(e), t.removeClass("current"), t.eq(i).css({"z-index": u,width: it,height: rt,left: ut,top: ft}).removeClass(e).addClass(o).addClass("current"), t.eq(ht).css({"z-index": r,width: w,height: p,left: ot,top: d}).removeClass(o).addClass(e), t.eq(tt).css({"z-index": r,width: w,height: p,left: st,top: d}).removeClass(e).addClass(o), v(i), y(i)
            },roundFlipAni: function(n, t, i, r, u, f, e, o, s, h, c, l, a, v, y, p, w) {
                var nt = n.width(), rt = n.height(), it = i - 1 < 0 ? t.length - 1 : i - 1, tt = i + 1 > t.length - 1 ? 0 : i + 1, ot = it - 1 < 0 ? t.length - 1 : it - 1, st = tt + 1 > t.length - 1 ? 0 : tt + 1, ht = a, ct = v, lt = (nt - a) / 2, at = (rt - v) / 2 - l, g = a / f, d = v / f, et = (rt - d) / 2 - l, vt = n.outerWidth() - n.width() + c, yt = nt - g - c, k = 0, b = 0, ut = (nt - k) / 2, ft = (rt - b) / 2 - l;
                t.stop(!0, !1), y();
                switch (s) {
                    case 0:
                        t.eq(ot).css({"z-index": r / f}).stop(!0, !0).animate({width: k,height: b,left: ut,top: ft}, h).removeClass(o).addClass(e);
                        break;
                    case 1:
                        t.eq(st).css({"z-index": r / f}).stop(!0, !0).animate({width: k,height: b,left: ut,top: ft}, h).removeClass(o).addClass(e);
                        break;
                    default:
                        t.eq(ot).css({"z-index": r / f}).stop(!0, !0).animate({width: k,height: b,left: ut,top: ft}, h).removeClass(o).addClass(e)
                }
                t.removeClass("current"), t.eq(i).css({"z-index": u}).stop(!0, !0).animate({width: ht,height: ct,left: lt,top: at}, h, function() {
                    p(i)
                }).removeClass(e).addClass(o).addClass("current"), t.eq(it).css({"z-index": r}).stop(!0, !0).animate({width: g,height: d,left: vt,top: et}, h), t.eq(tt).css({"z-index": r}).stop(!0, !0).animate({width: g,height: d,left: yt,top: et}, h), w(i)
            }}, i = n.extend({}, r, t), this.each(function() {
            var r = n(this), u = r.find(i.flipItem), p = i.scaleInt % 100, t = i.startInt, y = i.minZ, v = i.maxZ, a = i.lockedClass, l = i.unLockClass, d = r.find(i.prevBtn), k = r.find(i.nextBtn), b = i.speed, h = i.marginInt, s = i.topMarginInt, o = i.itemWidth, e = i.itemHeight, f = i.beforeFunc, w = i.afterFunc, c = i.afterSlipEx;
            n.roundFlipFunc.roundFlipSet(r, u, t, y, v, p, a, l, h, s, o, e, f, w, c), n(window).resize(function() {
                n.roundFlipFunc.roundFlipSet(r, u, t, y, v, p, a, l, h, s, o, e, f, w, c)
            }), d.bind({click: function() {
                    ctx.pcHallRoundBegining != 1 && (ctx.pcHallRoundBegining = 1, setTimeout("ctx.pcHallRoundBegining = 0;", 850), t = t - 1 < 0 ? u.length - 1 : t - 1, n.roundFlipFunc.roundFlipAni(r, u, t, y, v, p, a, l, 1, b, h, s, o, e, f, w, c))
                }}), k.bind({click: function() {
                    ctx.pcHallRoundBegining != 1 && (ctx.pcHallRoundBegining = 1, setTimeout("ctx.pcHallRoundBegining = 0;", 850), t = t + 1 > u.length - 1 ? 0 : parseInt(t + 1), n.roundFlipFunc.roundFlipAni(r, u, t, y, v, p, a, l, 0, b, h, s, o, e, f, w, c))
                }})
        })
    }
}(jQuery), $(function() {
    $(".ntio_button a").tipsy({gravity: "s",offset: 10}), $(".user_agent em").tipsy({gravity: "n",offset: 10,opacity: 1})
}), _intervalInt = undefined, this.JSON || (this.JSON = {}), function() {
    function i(n) {
        return n < 10 ? "0" + n : n
    }
    function o(n) {
        return e.lastIndex = 0, e.test(n) ? '"' + n.replace(e, function(n) {
            var t = s[n];
            return typeof t == "string" ? t : "\\u" + ("0000" + n.charCodeAt(0).toString(16)).slice(-4)
        }) + '"' : '"' + n + '"'
    }
    function u(i, f) {
        var c, l, s, a, v = n, h, e = f[i];
        e && typeof e == "object" && typeof e.toJSON == "function" && (e = e.toJSON(i)), typeof t == "function" && (e = t.call(f, i, e));
        switch (typeof e) {
            case "string":
                return o(e);
            case "number":
                return isFinite(e) ? String(e) : "null";
            case "boolean":
            case "null":
                return String(e);
            case "object":
                if (!e)
                    return "null";
                if (n += r, h = [], Object.prototype.toString.apply(e) === "[object Array]") {
                    for (a = e.length, c = 0; c < a; c += 1)
                        h[c] = u(c, e) || "null";
                    return s = h.length === 0 ? "[]" : n ? "[\n" + n + h.join(",\n" + n) + "\n" + v + "]" : "[" + h.join(",") + "]", n = v, s
                }
                if (t && typeof t == "object")
                    for (a = t.length, c = 0; c < a; c += 1)
                        l = t[c], typeof l == "string" && (s = u(l, e), s && h.push(o(l) + (n ? ": " : ":") + s));
                else
                    for (l in e)
                        Object.hasOwnProperty.call(e, l) && (s = u(l, e), s && h.push(o(l) + (n ? ": " : ":") + s));
                return s = h.length === 0 ? "{}" : n ? "{\n" + n + h.join(",\n" + n) + "\n" + v + "}" : "{" + h.join(",") + "}", n = v, s
        }
    }
    typeof Date.prototype.toJSON != "function" && (Date.prototype.toJSON = function() {
        return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + i(this.getUTCMonth() + 1) + "-" + i(this.getUTCDate()) + "T" + i(this.getUTCHours()) + ":" + i(this.getUTCMinutes()) + ":" + i(this.getUTCSeconds()) + "Z" : null
    }, String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function() {
        return this.valueOf()
    });
    var f = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, e = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, n, r, s = {"\b": "\\b","\t": "\\t","\n": "\\n","\f": "\\f","\r": "\\r",'"': '\\"',"\\": "\\\\"}, t;
    typeof JSON.stringify != "function" && (JSON.stringify = function(i, f, e) {
        var o;
        if (n = "", r = "", typeof e == "number")
            for (o = 0; o < e; o += 1)
                r += " ";
        else
            typeof e == "string" && (r = e);
        if (t = f, f && typeof f != "function" && (typeof f != "object" || typeof f.length != "number"))
            throw new Error("JSON.stringify");
        return u("", {"": i})
    }), typeof JSON.parse != "function" && (JSON.parse = function(text, reviver) {
        function walk(n, t) {
            var r, u, i = n[t];
            if (i && typeof i == "object")
                for (r in i)
                    Object.hasOwnProperty.call(i, r) && (u = walk(i, r), u !== undefined ? i[r] = u : delete i[r]);
            return reviver.call(n, t, i)
        }
        var j;
        if (text = String(text), f.lastIndex = 0, f.test(text) && (text = text.replace(f, function(n) {
            return "\\u" + ("0000" + n.charCodeAt(0).toString(16)).slice(-4)
        })), /^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, "")))
            return j = eval("(" + text + ")"), typeof reviver == "function" ? walk({"": j}, "") : j;
        throw new SyntaxError("JSON.parse");
    })
}(), function(n, t) {
    "use strict";
    function h(t, r) {
        var u, f;
        if (n.isArray(t)) {
            for (u = t.length - 1; u >= 0; u--)
                f = t[u], n.type(t) === "object" || n.type(f) === "string" && i.transports[f] || (r.log("Invalid transport: " + f + ", removing it from the transports list."), t.splice(u, 1));
            t.length === 0 && (r.log("No transports remain within the specified transport array."), t = null)
        } else if (n.type(t) === "object" || i.transports[t] || t === "auto") {
            if (t === "auto" && i._.ieVersion <= 8)
                return ["longPolling"]
        } else
            r.log("Invalid transport: " + t.toString()), t = null;
        return t
    }
    function c(n) {
        return n === "http:" ? 80 : n === "https:" ? 443 : void 0
    }
    function e(n, t) {
        return t.match(/:\d+$/) ? t : t + ":" + c(n)
    }
    if (typeof n != "function")
        throw new Error("SignalR: jQuery not found. Please ensure jQuery is referenced before the SignalR.js file.");
    if (!t.JSON)
        throw new Error("SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.");
    var i, o, s = t.document.readyState === "complete", f = n(t), r = {onStart: "onStart",onStarting: "onStarting",onReceived: "onReceived",onError: "onError",onConnectionSlow: "onConnectionSlow",onReconnecting: "onReconnecting",onReconnect: "onReconnect",onStateChanged: "onStateChanged",onDisconnect: "onDisconnect"}, l = function(n, i) {
        if (i !== !1) {
            var r;
            typeof t.console != "undefined" && (r = "[" + (new Date).toTimeString() + "] SignalR: " + n, t.console.debug ? t.console.debug(r) : t.console.log && t.console.log(r))
        }
    }, u = function(t, i, u) {
        return i === t.state ? (t.state = u, n(t).triggerHandler(r.onStateChanged, [{oldState: i,newState: u}]), !0) : !1
    }, a = function(n) {
        return n.state === i.connectionState.disconnected
    }, v = function(n) {
        var r, u;
        n._.configuredStopReconnectingTimeout || (u = function(n) {
            n.log("Couldn't reconnect within the configured timeout (" + n.disconnectTimeout + "ms), disconnecting."), n.stop(!1, !1)
        }, n.reconnecting(function() {
            var n = this;
            n.state === i.connectionState.reconnecting && (r = t.setTimeout(function() {
                u(n)
            }, n.disconnectTimeout))
        }), n.stateChanged(function(n) {
            n.oldState === i.connectionState.reconnecting && t.clearTimeout(r)
        }), n._.configuredStopReconnectingTimeout = !0)
    };
    i = function(n, t, r) {
        return new i.fn.init(n, t, r)
    }, i._ = {defaultContentType: "application/x-www-form-urlencoded; charset=UTF-8",ieVersion: function() {
            var i, n;
            return t.navigator.appName === "Microsoft Internet Explorer" && (n = /MSIE ([0-9]+\.[0-9]+)/.exec(t.navigator.userAgent), n && (i = t.parseFloat(n[1]))), i
        }()}, i.events = r, i.changeState = u, i.isDisconnecting = a, i.connectionState = {connecting: 0,connected: 1,reconnecting: 2,disconnected: 4}, i.hub = {start: function() {
            throw new Error("SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/hubs'><\/script>.");
        }}, f.load(function() {
        s = !0
    }), i.fn = i.prototype = {init: function(n, t, i) {
            this.url = n, this.qs = t, this._ = {}, typeof i == "boolean" && (this.logging = i)
        },isCrossDomain: function(i, r) {
            var u;
            return (i = n.trim(i), i.indexOf("http") !== 0) ? !1 : (r = r || t.location, u = t.document.createElement("a"), u.href = i, u.protocol + e(u.protocol, u.host) !== r.protocol + e(r.protocol, r.host))
        },ajaxDataType: "json",contentType: "application/json; charset=UTF-8",logging: !1,state: i.connectionState.disconnected,keepAliveData: {},reconnectDelay: 2e3,disconnectTimeout: 3e4,keepAliveWarnAt: 2 / 3,start: function(e, o) {
            var c = this, l = {waitForPageLoad: !0,transport: "auto",jsonp: !1}, w, a = c._deferral || n.Deferred(), y = t.document.createElement("a"), p;
            if (n.type(e) === "function" ? o = e : n.type(e) === "object" && (n.extend(l, e), n.type(l.callback) === "function" && (o = l.callback)), l.transport = h(l.transport, c), !l.transport)
                throw new Error("SignalR: Invalid transport(s) specified, aborting start.");
            return !s && l.waitForPageLoad === !0 ? (f.load(function() {
                c._deferral = a, c.start(e, o)
            }), a.promise()) : (v(c), u(c, i.connectionState.disconnected, i.connectionState.connecting) === !1) ? (a.resolve(c), a.promise()) : (y.href = c.url, y.protocol && y.protocol !== ":" ? (c.protocol = y.protocol, c.host = y.host, c.baseUrl = y.protocol + "//" + y.host) : (c.protocol = t.document.location.protocol, c.host = t.document.location.host, c.baseUrl = c.protocol + "//" + c.host), c.wsProtocol = c.protocol === "https:" ? "wss://" : "ws://", l.transport === "auto" && l.jsonp === !0 && (l.transport = "longPolling"), this.isCrossDomain(c.url) && (c.log("Auto detected cross domain url."), l.transport === "auto" && (l.transport = ["webSockets", "longPolling"]), l.jsonp || (l.jsonp = !n.support.cors, l.jsonp && c.log("Using jsonp because this browser doesn't support CORS")), c.contentType = i._.defaultContentType), c.ajaxDataType = l.jsonp ? "jsonp" : "json", n(c).bind(r.onStart, function() {
                n.type(o) === "function" && o.call(c), a.resolve(c)
            }), w = function(t, e) {
                if (e = e || 0, e >= t.length) {
                    c.transport || (n(c).triggerHandler(r.onError, ["SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."]), a.reject("SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."), c.stop());
                    return
                }
                var o = t[e], s = n.type(o) === "object" ? o : i.transports[o];
                if (o.indexOf("_") === 0) {
                    w(t, e + 1);
                    return
                }
                s.start(c, function() {
                    s.supportsKeepAlive && c.keepAliveData.activated && i.transports._logic.monitorKeepAlive(c), c.transport = s, u(c, i.connectionState.connecting, i.connectionState.connected), n(c).triggerHandler(r.onStart), f.unload(function() {
                        c.stop(!1)
                    })
                }, function() {
                    w(t, e + 1)
                })
            }, p = c.url + "", p = i.transports._logic.addQs(p, c), c.log("Negotiating with '" + p + "'."), n.ajax({url: p,global: !1,cache: !1,type: "GET",contentType: c.contentType,data: {},dataType: c.ajaxDataType,error: function(t) {
                    n(c).triggerHandler(r.onError, [t.responseText]), a.reject("SignalR: Error during negotiation request: " + t.responseText), c.stop()
                },success: function(t) {
                    var u = c.keepAliveData, f, e;
                    if (c.appRelativeUrl = t.Url, c.id = t.ConnectionId, c.token = t.ConnectionToken, c.webSocketServerUrl = t.WebSocketServerUrl, c.disconnectTimeout = t.DisconnectTimeout * 1e3, t.KeepAliveTimeout ? (u.activated = !0, u.timeout = t.KeepAliveTimeout * 1e3, u.timeoutWarning = u.timeout * c.keepAliveWarnAt, u.checkInterval = (u.timeout - u.timeoutWarning) / 3) : u.activated = !1, !t.ProtocolVersion || t.ProtocolVersion !== "1.2") {
                        n(c).triggerHandler(r.onError, ["You are using a version of the client that isn't compatible with the server. Client version 1.2, server version " + t.ProtocolVersion + "."]), a.reject("You are using a version of the client that isn't compatible with the server. Client version 1.2, server version " + t.ProtocolVersion + ".");
                        return
                    }
                    n(c).triggerHandler(r.onStarting), f = [], e = [], n.each(i.transports, function(n) {
                        if (n === "webSockets" && !t.TryWebSockets)
                            return !0;
                        e.push(n)
                    }), n.isArray(l.transport) ? n.each(l.transport, function() {
                        var t = this;
                        (n.type(t) === "object" || n.type(t) === "string" && n.inArray("" + t, e) >= 0) && f.push(n.type(t) === "string" ? "" + t : t)
                    }) : n.type(l.transport) === "object" || n.inArray(l.transport, e) >= 0 ? f.push(l.transport) : f = e, w(f)
                }}), a.promise())
        },starting: function(t) {
            var i = this;
            return n(i).bind(r.onStarting, function() {
                t.call(i)
            }), i
        },send: function(n) {
            var t = this;
            if (t.state === i.connectionState.disconnected)
                throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");
            if (t.state === i.connectionState.connecting)
                throw new Error("SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started.");
            return t.transport.send(t, n), t
        },received: function(t) {
            var i = this;
            return n(i).bind(r.onReceived, function(n, r) {
                t.call(i, r)
            }), i
        },stateChanged: function(t) {
            var i = this;
            return n(i).bind(r.onStateChanged, function(n, r) {
                t.call(i, r)
            }), i
        },error: function(t) {
            var i = this;
            return n(i).bind(r.onError, function(n, r) {
                t.call(i, r)
            }), i
        },disconnected: function(t) {
            var i = this;
            return n(i).bind(r.onDisconnect, function() {
                t.call(i)
            }), i
        },connectionSlow: function(t) {
            var i = this;
            return n(i).bind(r.onConnectionSlow, function() {
                t.call(i)
            }), i
        },reconnecting: function(t) {
            var i = this;
            return n(i).bind(r.onReconnecting, function() {
                t.call(i)
            }), i
        },reconnected: function(t) {
            var i = this;
            return n(i).bind(r.onReconnect, function() {
                t.call(i)
            }), i
        },stop: function(t, f) {
            var e = this;
            if (e.state !== i.connectionState.disconnected) {
                try {
                    e.transport && (f !== !1 && e.transport.abort(e, t), e.transport.supportsKeepAlive && e.keepAliveData.activated && i.transports._logic.stopMonitoringKeepAlive(e), e.transport.stop(e), e.transport = null), n(e).triggerHandler(r.onDisconnect), delete e.messageId, delete e.groupsToken, delete e.id, delete e._deferral
                }finally {
                    u(e, e.state, i.connectionState.disconnected)
                }
                return e
            }
        },log: function(n) {
            l(n, this.logging)
        }}, i.fn.init.prototype = i.fn, i.noConflict = function() {
        return n.connection === i && (n.connection = o), i
    }, n.connection && (o = n.connection), n.connection = n.signalR = i
}(window.jQuery, window), function(n, t) {
    "use strict";
    function u(f) {
        var e = f.keepAliveData, o, s;
        f.state === i.connectionState.connected && (o = new Date, o.setTime(o - e.lastKeepAlive), s = o.getTime(), s >= e.timeout ? (f.log("Keep alive timed out.  Notifying transport that connection has been lost."), f.transport.lostConnection(f)) : s >= e.timeoutWarning ? e.userNotified || (f.log("Keep alive has been missed, connection may be dead/slow."), n(f).triggerHandler(r.onConnectionSlow), e.userNotified = !0) : e.userNotified = !1), e.monitoring && t.setTimeout(function() {
            u(f)
        }, e.checkInterval)
    }
    function f(n) {
        return n.state === i.connectionState.connected || n.state === i.connectionState.reconnecting
    }
    var i = n.signalR, r = n.signalR.events, e = n.signalR.changeState;
    i.transports = {}, i.transports._logic = {pingServer: function(t, i) {
            var f = i === "webSockets" ? "" : t.baseUrl, u = f + t.appRelativeUrl + "/ping", r = n.Deferred();
            return u = this.addQs(u, t), n.ajax({url: u,global: !1,cache: !1,type: "GET",contentType: t.contentType,data: {},dataType: t.ajaxDataType,success: function(n) {
                    n.Response === "pong" ? r.resolve() : r.reject("SignalR: Invalid ping response when pinging server: " + (n.responseText || n.statusText))
                },error: function(n) {
                    r.reject("SignalR: Error pinging server: " + (n.responseText || n.statusText))
                }}), r.promise()
        },addQs: function(t, i) {
            var r = t.indexOf("?") !== -1 ? "&" : "?", u;
            if (!i.qs)
                return t;
            if (typeof i.qs == "object")
                return t + r + n.param(i.qs);
            if (typeof i.qs == "string")
                return u = i.qs.charAt(0), (u === "?" || u === "&") && (r = ""), t + r + i.qs;
            throw new Error("Connections query string property must be either a string or object.");
        },getUrl: function(n, i, r, u) {
            var o = i === "webSockets" ? "" : n.baseUrl, f = o + n.appRelativeUrl, e = "transport=" + i + "&connectionToken=" + t.encodeURIComponent(n.token);
            return n.data && (e += "&connectionData=" + t.encodeURIComponent(n.data)), n.groupsToken && (e += "&groupsToken=" + t.encodeURIComponent(n.groupsToken)), r ? (f += u ? "/poll" : "/reconnect", n.messageId && (e += "&messageId=" + t.encodeURIComponent(n.messageId))) : f += "/connect", f += "?" + e, f = this.addQs(f, n), f += "&tid=" + Math.floor(Math.random() * 11)
        },maximizePersistentResponse: function(n) {
            return {MessageId: n.C,Messages: n.M,Disconnect: typeof n.D != "undefined" ? !0 : !1,TimedOut: typeof n.T != "undefined" ? !0 : !1,LongPollDelay: n.L,GroupsToken: n.G}
        },updateGroups: function(n, t) {
            t && (n.groupsToken = t)
        },ajaxSend: function(u, f) {
            var e = u.url + "/send?transport=" + u.transport.name + "&connectionToken=" + t.encodeURIComponent(u.token);
            return e = this.addQs(e, u), n.ajax({url: e,global: !1,type: u.ajaxDataType === "jsonp" ? "GET" : "POST",contentType: i._.defaultContentType,dataType: u.ajaxDataType,data: {data: f},success: function(t) {
                    t && n(u).triggerHandler(r.onReceived, [t])
                },error: function(t, i) {
                    i !== "abort" && i !== "parsererror" && n(u).triggerHandler(r.onError, [t])
                }})
        },ajaxAbort: function(i, r) {
            if (typeof i.transport != "undefined") {
                r = typeof r == "undefined" ? !0 : r;
                var u = i.url + "/abort?transport=" + i.transport.name + "&connectionToken=" + t.encodeURIComponent(i.token);
                u = this.addQs(u, i), n.ajax({url: u,async: r,timeout: 1e3,global: !1,type: "POST",contentType: i.contentType,dataType: i.ajaxDataType,data: {}}), i.log("Fired ajax abort async = " + r)
            }
        },processMessages: function(t, i) {
            var u, f;
            if (t.transport) {
                if (f = n(t), t.transport.supportsKeepAlive && t.keepAliveData.activated && this.updateKeepAlive(t), !i)
                    return;
                if (u = this.maximizePersistentResponse(i), u.Disconnect) {
                    t.log("Disconnect command received from server"), t.stop(!1, !1);
                    return
                }
                this.updateGroups(t, u.GroupsToken), u.Messages && n.each(u.Messages, function(n, t) {
                    f.triggerHandler(r.onReceived, [t])
                }), u.MessageId && (t.messageId = u.MessageId)
            }
        },monitorKeepAlive: function(t) {
            var i = t.keepAliveData, f = this;
            i.monitoring ? t.log("Tried to monitor keep alive but it's already being monitored") : (i.monitoring = !0, f.updateKeepAlive(t), t.keepAliveData.reconnectKeepAliveUpdate = function() {
                f.updateKeepAlive(t)
            }, n(t).bind(r.onReconnect, t.keepAliveData.reconnectKeepAliveUpdate), t.log("Now monitoring keep alive with a warning timeout of " + i.timeoutWarning + " and a connection lost timeout of " + i.timeout), u(t))
        },stopMonitoringKeepAlive: function(t) {
            var i = t.keepAliveData;
            i.monitoring && (i.monitoring = !1, n(t).unbind(r.onReconnect, t.keepAliveData.reconnectKeepAliveUpdate), t.keepAliveData = {}, t.log("Stopping the monitoring of the keep alive"))
        },updateKeepAlive: function(n) {
            n.keepAliveData.lastKeepAlive = new Date
        },ensureReconnectingState: function(t) {
            return e(t, i.connectionState.connected, i.connectionState.reconnecting) === !0 && n(t).triggerHandler(r.onReconnecting), t.state === i.connectionState.reconnecting
        },clearReconnectTimeout: function(n) {
            n && n._.reconnectTimeout && (t.clearTimeout(n._.reconnectTimeout), delete n._.reconnectTimeout)
        },reconnect: function(n, r) {
            var u = i.transports[r], e = this;
            f(n) && !n._.reconnectTimeout && (n._.reconnectTimeout = t.setTimeout(function() {
                u.stop(n), e.ensureReconnectingState(n) && (n.log(r + " reconnecting"), u.start(n))
            }, n.reconnectDelay))
        },foreverFrame: {count: 0,connections: {}}}
}(window.jQuery, window), function(n, t) {
    "use strict";
    var r = n.signalR, u = n.signalR.events, f = n.signalR.changeState, i = r.transports._logic;
    r.transports.webSockets = {name: "webSockets",supportsKeepAlive: !0,send: function(n, t) {
            n.socket.send(t)
        },start: function(e, o, s) {
            var h, c = !1, l = this, a = !o, v = n(e);
            if (!t.WebSocket) {
                s();
                return
            }
            e.socket || (h = e.webSocketServerUrl ? e.webSocketServerUrl : e.wsProtocol + e.host, h += i.getUrl(e, this.name, a), e.log("Connecting to websocket endpoint '" + h + "'"), e.socket = new t.WebSocket(h), e.socket.onopen = function() {
                c = !0, e.log("Websocket opened"), i.clearReconnectTimeout(e), o ? o() : f(e, r.connectionState.reconnecting, r.connectionState.connected) === !0 && v.triggerHandler(u.onReconnect)
            }, e.socket.onclose = function(t) {
                if (this === e.socket) {
                    if (c)
                        typeof t.wasClean != "undefined" && t.wasClean === !1 ? (n(e).triggerHandler(u.onError, [t.reason]), e.log("Unclean disconnect from websocket." + t.reason)) : e.log("Websocket closed");
                    else {
                        s ? s() : a && l.reconnect(e);
                        return
                    }
                    l.reconnect(e)
                }
            }, e.socket.onmessage = function(r) {
                var f = t.JSON.parse(r.data), o = n(e);
                f && (n.isEmptyObject(f) || f.M ? i.processMessages(e, f) : o.triggerHandler(u.onReceived, [f]))
            })
        },reconnect: function(n) {
            i.reconnect(n, this.name)
        },lostConnection: function(n) {
            this.reconnect(n)
        },stop: function(n) {
            i.clearReconnectTimeout(n), n.socket !== null && (n.log("Closing the Websocket"), n.socket.close(), n.socket = null)
        },abort: function() {
        }}
}(window.jQuery, window), function(n, t) {
    "use strict";
    var r = n.signalR, u = n.signalR.events, f = n.signalR.changeState, i = r.transports._logic;
    r.transports.serverSentEvents = {name: "serverSentEvents",supportsKeepAlive: !0,timeOut: 3e3,start: function(e, o, s) {
            var h = this, c = !1, a = n(e), l = !o, v, y;
            if (e.eventSource && (e.log("The connection already has an event source. Stopping it."), e.stop()), !t.EventSource) {
                s && (e.log("This browser doesn't support SSE."), s());
                return
            }
            v = i.getUrl(e, this.name, l);
            try {
                e.log("Attempting to connect to SSE endpoint '" + v + "'"), e.eventSource = new t.EventSource(v)
            } catch (p) {
                e.log("EventSource failed trying to connect with error " + p.Message), s ? s() : (a.triggerHandler(u.onError, [p]), l && h.reconnect(e));
                return
            }
            y = t.setTimeout(function() {
                c === !1 && (e.log("EventSource timed out trying to connect"), e.log("EventSource readyState: " + e.eventSource.readyState), l || h.stop(e), l ? e.eventSource.readyState !== t.EventSource.CONNECTING && e.eventSource.readyState !== t.EventSource.OPEN && h.reconnect(e) : s && s())
            }, h.timeOut), e.eventSource.addEventListener("open", function() {
                e.log("EventSource connected"), y && t.clearTimeout(y), i.clearReconnectTimeout(e), c === !1 && (c = !0, o ? o() : f(e, r.connectionState.reconnecting, r.connectionState.connected) === !0 && a.triggerHandler(u.onReconnect))
            }, !1), e.eventSource.addEventListener("message", function(n) {
                n.data !== "initialized" && i.processMessages(e, t.JSON.parse(n.data))
            }, !1), e.eventSource.addEventListener("error", function(n) {
                if (this === e.eventSource) {
                    if (!c) {
                        s && s();
                        return
                    }
                    e.log("EventSource readyState: " + e.eventSource.readyState), n.eventPhase === t.EventSource.CLOSED ? (e.log("EventSource reconnecting due to the server connection ending"), h.reconnect(e)) : (e.log("EventSource error"), a.triggerHandler(u.onError))
                }
            }, !1)
        },reconnect: function(n) {
            i.reconnect(n, this.name)
        },lostConnection: function(n) {
            this.reconnect(n)
        },send: function(n, t) {
            i.ajaxSend(n, t)
        },stop: function(n) {
            i.clearReconnectTimeout(n), n && n.eventSource && (n.log("EventSource calling close()"), n.eventSource.close(), n.eventSource = null, delete n.eventSource)
        },abort: function(n, t) {
            i.ajaxAbort(n, t)
        }}
}(window.jQuery, window), function(n, t) {
    "use strict";
    var r = n.signalR, f = n.signalR.events, e = n.signalR.changeState, i = r.transports._logic, u = function() {
        var u = null, f = 1e3, i = 0;
        return {prevent: function() {
                r._.ieVersion <= 8 && (i === 0 && (u = t.setInterval(function() {
                    var t = n("<iframe style='position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;' src=''></iframe>");
                    n("body").append(t), t.remove(), t = null
                }, f)), i++)
            },cancel: function() {
                i === 1 && t.clearInterval(u), i > 0 && i--
            }}
    }();
    r.transports.foreverFrame = {name: "foreverFrame",supportsKeepAlive: !0,timeOut: 3e3,start: function(r, f, e) {
            var o = this, h = i.foreverFrame.count += 1, c, s = n("<iframe data-signalr-connection-id='" + r.id + "' style='position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;' src=''></iframe>");
            if (t.EventSource) {
                e && (r.log("This browser supports SSE, skipping Forever Frame."), e());
                return
            }
            u.prevent(), c = i.getUrl(r, this.name), c += "&frameId=" + h, n("body").append(s), s.prop("src", c), i.foreverFrame.connections[h] = r, r.log("Binding to iframe's readystatechange event."), s.bind("readystatechange", function() {
                n.inArray(this.readyState, ["loaded", "complete"]) >= 0 && (r.log("Forever frame iframe readyState changed to " + this.readyState + ", reconnecting"), o.reconnect(r))
            }), r.frame = s[0], r.frameId = h, f && (r.onSuccess = f), t.setTimeout(function() {
                r.onSuccess && (r.log("Failed to connect using forever frame source, it timed out after " + o.timeOut + "ms."), o.stop(r), e && e())
            }, o.timeOut)
        },reconnect: function(n) {
            var r = this;
            t.setTimeout(function() {
                if (n.frame && i.ensureReconnectingState(n)) {
                    var u = n.frame, t = i.getUrl(n, r.name, !0) + "&frameId=" + n.frameId;
                    n.log("Updating iframe src to '" + t + "'."), u.src = t
                }
            }, n.reconnectDelay)
        },lostConnection: function(n) {
            this.reconnect(n)
        },send: function(n, t) {
            i.ajaxSend(n, t)
        },receive: function(t, r) {
            var u;
            i.processMessages(t, r), t.frameMessageCount = (t.frameMessageCount || 0) + 1, t.frameMessageCount > 50 && (t.frameMessageCount = 0, u = t.frame.contentWindow || t.frame.contentDocument, u && u.document && n("body", u.document).empty())
        },stop: function(t) {
            var r = null;
            if (u.cancel(), t.frame) {
                if (t.frame.stop)
                    t.frame.stop();
                else
                    try {
                        r = t.frame.contentWindow || t.frame.contentDocument, r.document && r.document.execCommand && r.document.execCommand("Stop")
                    } catch (f) {
                        t.log("SignalR: Error occured when stopping foreverFrame transport. Message = " + f.message)
                    }
                n(t.frame).remove(), delete i.foreverFrame.connections[t.frameId], t.frame = null, t.frameId = null, delete t.frame, delete t.frameId, t.log("Stopping forever frame")
            }
        },abort: function(n, t) {
            i.ajaxAbort(n, t)
        },getConnection: function(n) {
            return i.foreverFrame.connections[n]
        },started: function(t) {
            t.onSuccess ? (t.onSuccess(), t.onSuccess = null, delete t.onSuccess) : e(t, r.connectionState.reconnecting, r.connectionState.connected) === !0 && n(t).triggerHandler(f.onReconnect)
        }}
}(window.jQuery, window), function(n, t) {
    "use strict";
    var r = n.signalR, f = n.signalR.events, e = n.signalR.changeState, u = n.signalR.isDisconnecting, i = r.transports._logic;
    r.transports.longPolling = {name: "longPolling",supportsKeepAlive: !1,reconnectDelay: 3e3,init: function(n, r) {
            var e = this, f, o = function(i) {
                u(n) === !1 && (n.log("SignalR: Server ping failed because '" + i + "', re-trying ping."), t.setTimeout(f, e.reconnectDelay))
            };
            n.log("SignalR: Initializing long polling connection with server."), f = function() {
                /*i.pingServer(n, e.name).done(r).fail(o)*/
            }, f()
        },start: function(o, s) {
            var c = this, a = !1, v = function() {
                a || (a = !0, s(), o.log("Longpolling connected"))
            }, l = 0, h = null, y = function(i) {
                t.clearTimeout(h), h = null, e(o, r.connectionState.reconnecting, r.connectionState.connected) === !0 && (o.log("Raising the reconnect event"), n(i).triggerHandler(f.onReconnect))
            }, p = 36e5;
            o.pollXhr && (o.log("Polling xhr requests already exists, aborting."), o.stop()), c.init(o, function() {
                o.messageId = null, t.setTimeout(function() {
                    (function e(s, a) {
                        var k = s.messageId, d = k === null, w = !d, g = !a, b = i.getUrl(s, c.name, w, g);
                        u(s) !== !0 && (o.log("Attempting to connect to '" + b + "' using longPolling."), s.pollXhr = n.ajax({url: b,global: !1,cache: !1,type: "GET",dataType: o.ajaxDataType,contentType: o.contentType,success: function(r) {
                                var o = 0, f;
                                (l = 0, h !== null && y(), v(), r && (f = i.maximizePersistentResponse(r)), i.processMessages(s, r), f && n.type(f.LongPollDelay) === "number" && (o = f.LongPollDelay), f && f.Disconnect) || u(s) !== !0 && (o > 0 ? t.setTimeout(function() {
                                    e(s, !1)
                                }, o) : e(s, !1))
                            },error: function(u, a) {
                                if (t.clearTimeout(h), h = null, a === "abort") {
                                    o.log("Aborted xhr requst.");
                                    return
                                }
                                l++, o.state !== r.connectionState.reconnecting && (o.log("An error occurred using longPolling. Status = " + a + ". " + u.responseText), n(s).triggerHandler(f.onError, [u.responseText])), i.ensureReconnectingState(s), c.init(s, function() {
                                    e(s, !0)
                                })
                            }}), w && a === !0 && (h = t.setTimeout(function() {
                            y(s)
                        }, Math.min(1e3 * (Math.pow(2, l) - 1), p))))
                    })(o), t.setTimeout(function() {
                        v()
                    }, 250)
                }, 250)
            })
        },lostConnection: function() {
            throw new Error("Lost Connection not handled for LongPolling");
        },send: function(n, t) {
            i.ajaxSend(n, t)
        },stop: function(n) {
            n.pollXhr && (n.pollXhr.abort(), n.pollXhr = null, delete n.pollXhr)
        },abort: function(n, t) {
            i.ajaxAbort(n, t)
        }}
}(window.jQuery, window), function(n, t) {
    "use strict";
    function u(n) {
        return n + c
    }
    function s(n, t, i) {
        for (var f = n.length, u = [], r = 0; r < f; r += 1)
            n.hasOwnProperty(r) && (u[r] = t.call(i, n[r], r, n));
        return u
    }
    function h(t) {
        return n.isFunction(t) ? null : n.type(t) === "undefined" ? null : t
    }
    function o(n) {
        for (var t in n)
            if (n.hasOwnProperty(t))
                return !0;
        return !1
    }
    function r(n, t) {
        return new r.fn.init(n, t)
    }
    function i(t, r) {
        var u = {qs: null,logging: !1,useDefaultPath: !0};
        return n.extend(u, r), (!t || u.useDefaultPath) && (t = (t || "") + "/signalr"), new i.fn.init(t, u)
    }
    var e = 0, f = {}, c = ".hubProxy";
    r.fn = r.prototype = {init: function(n, t) {
            this.state = {}, this.connection = n, this.hubName = t, this._ = {callbackMap: {}}
        },hasSubscriptions: function() {
            return o(this._.callbackMap)
        },on: function(t, i) {
            var r = this, f = r._.callbackMap;
            return t = t.toLowerCase(), f[t] || (f[t] = {}), f[t][i] = function(n, t) {
                i.apply(r, t)
            }, n(r).bind(u(t), f[t][i]), r
        },off: function(t, i) {
            var f = this, e = f._.callbackMap, r;
            return t = t.toLowerCase(), r = e[t], r && (r[i] ? (n(f).unbind(u(t), r[i]), delete r[i], o(r) || delete e[t]) : i || (n(f).unbind(u(t)), delete e[t])), f
        },invoke: function(i) {
            var r = this, c = n.makeArray(arguments).slice(1), l = s(c, h), o = {H: r.hubName,M: i,A: l,I: e}, u = n.Deferred(), a = function(t) {
                var i = r._maximizeHubResponse(t);
                n.extend(r.state, i.State), i.Error ? (i.StackTrace && r.connection.log(i.Error + "\n" + i.StackTrace), u.rejectWith(r, [i.Error])) : u.resolveWith(r, [i.Result])
            };
            return f[e.toString()] = {scope: r,method: a}, e += 1, n.isEmptyObject(r.state) || (o.S = r.state), r.connection.send(t.JSON.stringify(o)), u.promise()
        },_maximizeHubResponse: function(n) {
            return {State: n.S,Result: n.R,Id: n.I,Error: n.E,StackTrace: n.T}
        }}, r.fn.init.prototype = r.fn, i.fn = i.prototype = n.connection(), i.fn.init = function(t, i) {
        var e = {qs: null,logging: !1,useDefaultPath: !0}, r = this;
        n.extend(e, i), n.signalR.fn.init.call(r, t, e.qs, e.logging), r.proxies = {}, r.received(function(t) {
            var i, s, e, o, h, c;
            t && (typeof t.I != "undefined" ? (e = t.I.toString(), o = f[e], o && (f[e] = null, delete f[e], o.method.call(o.scope, t))) : (i = this._maximizeClientHubInvocation(t), r.log("Triggering client hub event '" + i.Method + "' on hub '" + i.Hub + "'."), h = i.Hub.toLowerCase(), c = i.Method.toLowerCase(), s = this.proxies[h], n.extend(s.state, i.State), n(s).triggerHandler(u(c), [i.Args])))
        })
    }, i.fn._maximizeClientHubInvocation = function(n) {
        return {Hub: n.H,Method: n.M,Args: n.A,State: n.S}
    }, i.fn._registerSubscribedHubs = function() {
        this._subscribedToHubs || (this._subscribedToHubs = !0, this.starting(function() {
            var i = [];
            n.each(this.proxies, function(n) {
                this.hasSubscriptions() && i.push({name: n})
            }), this.data = t.JSON.stringify(i)
        }))
    }, i.fn.createHubProxy = function(n) {
        n = n.toLowerCase();
        var t = this.proxies[n];
        return t || (t = r(this, n), this.proxies[n] = t), this._registerSubscribedHubs(), t
    }, i.fn.init.prototype = i.fn, n.hubConnection = i
}(window.jQuery, window), function(n) {
    n.signalR.version = "1.1.2"
}(window.jQuery), function(n) {
    "use strict";
    function u(t, i) {
        return function() {
            i.apply(t, n.makeArray(arguments))
        }
    }
    function r(t, i) {
        var e, r, f, o, s;
        for (e in t)
            if (t.hasOwnProperty(e)) {
                if (r = t[e], !r.hubName)
                    continue;
                s = i ? r.on : r.off;
                for (f in r.client)
                    if (r.client.hasOwnProperty(f)) {
                        if (o = r.client[f], !n.isFunction(o))
                            continue;
                        s.call(r, f, u(r, o))
                    }
            }
    }
    if (typeof n.signalR != "function")
        throw new Error("SignalR: SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/hubs.");
    var i = n.signalR;
    n.hubConnection.prototype.createHubProxies = function() {
        var n = {};
        return this.starting(function() {
            r(n, !0), this._registerSubscribedHubs()
        }).disconnected(function() {
            r(n, !1)
        }), n.mainHub = this.createHubProxy("mainHub"), n.mainHub.client = {}, n
    }, i.hub = n.hubConnection("/signalr", {useDefaultPath: !1}), n.extend(i, i.hub.createHubProxies())
}(window.jQuery, window), $(function() {
    function i() {
         t = !0, $.connection.hub.stop()
    }
    var n = $.connection.mainHub, t = !1;
    $.connection.hub.url = SignalrServerUrl + "index.php?ac=signalr", $.connection.hub.qs = {userName: $("#ServerUserName").val(),userType: $("#ServerUserType").val(),userId: $("#ServerUserId").val(),HostName: HostName}, n.client.getMessage = function(n) {
         n.MessageType == 3 ? typeof ctx.receiveSocketLottery == "function" && ctx.receiveSocketLottery(n.Title, n.Content) : n.MessageType == 4 ? typeof ctx.receiveSocketAward == "function" && ctx.receiveSocketAward(n.Title, n.Content) : n.MessageType == 1 ? setTimeout(function() {
             showNewMessage(n), refreshGamePoin()
         }, GetRandomNum(1, 100) * 100) : n.MessageType == 5 || n.MessageType == 9 ? showNewMessage(n) : (n.MessageType == 6 || n.MessageType == 7) && (refreshGamePoin(), showNewMessage(n))
    }, n.client.OffLine = function(n) {
         (t = !0, $.connection.hub.id == n) && ($.connection.hub.stop(), _alert("你已经在另外一个地方登陆了！"), window.location.href = "index.php?ac=login&op=logout")
    }, n.client.OffLineAndGHome = function(n) {
         (t = !0, $.connection.hub.id == n) && ($.connection.hub.stop(), _alert("同一浏览器只能登陆一个帐号！"), window.location.href = "index.php?ac=login&op=logout")
    }, n.client.KickUser = function() {
         $.connection.hub.stop(), window.location.href = "index.php?ac=login&op=logout"
    }, $.connection.hub.stateChanged(function(n) {
         t || n.newState !== $.signalR.connectionState.disconnected || (_alert("客户端无法和服务器建立连接,请重新登录！"), 1)
    }), $.connection.hub.start({jsonp: !0,transport: ["webSockets", "longPolling"]}).done(), window.onbeforeunload = i
}), ZeroClipboard = {version: "1.0.7",clients: {},moviePath: "ZeroClipboard.swf",nextId: 1,$: function(n) {
        return typeof n == "string" && (n = document.getElementById(n)), n.addClass || (n.hide = function() {
            this.style.display = "none"
        }, n.show = function() {
            this.style.display = ""
        }, n.addClass = function(n) {
            this.removeClass(n), this.className += " " + n
        }, n.removeClass = function(n) {
            for (var i = this.className.split(/\s+/), r = -1, t = 0; t < i.length; t++)
                i[t] == n && (r = t, t = i.length);
            return r > -1 && (i.splice(r, 1), this.className = i.join(" ")), this
        }, n.hasClass = function(n) {
            return !!this.className.match(new RegExp("\\s*" + n + "\\s*"))
        }), n
    },setMoviePath: function(n) {
        this.moviePath = n
    },dispatch: function(n, t, i) {
        var r = this.clients[n];
        r && r.receiveEvent(t, i)
    },register: function(n, t) {
        this.clients[n] = t
    },getDOMObjectPosition: function(n, t) {
        for (var i = {left: 0,top: 0,width: n.width ? n.width : n.offsetWidth,height: n.height ? n.height : n.offsetHeight}; n && n != t; )
            i.left += n.offsetLeft, i.top += n.offsetTop, n = n.offsetParent;
        return i
    },Client: function(n) {
        this.handlers = {}, this.id = ZeroClipboard.nextId++, this.movieId = "ZeroClipboardMovie_" + this.id, ZeroClipboard.register(this.id, this), n && this.glue(n)
    }}, ZeroClipboard.Client.prototype = {id: 0,ready: !1,movie: null,clipText: "",handCursorEnabled: !0,cssEffects: !0,handlers: null,glue: function(n, t, i) {
        var f, u, r;
        if (this.domElement = ZeroClipboard.$(n), f = 99, this.domElement.style.zIndex && (f = parseInt(this.domElement.style.zIndex, 10) + 1), typeof t == "string" ? t = ZeroClipboard.$(t) : typeof t == "undefined" && (t = document.getElementsByTagName("body")[0]), u = ZeroClipboard.getDOMObjectPosition(this.domElement, t), this.div = document.createElement("div"), r = this.div.style, r.position = "absolute", r.left = "" + u.left + "px", r.top = "" + u.top + "px", r.width = "" + u.width + "px", r.height = "" + u.height + "px", r.zIndex = f, typeof i == "object")
            for (addedStyle in i)
                r[addedStyle] = i[addedStyle];
        t.appendChild(this.div), this.div.innerHTML = this.getHTML(u.width, u.height)
    },getHTML: function(n, t) {
        var i = "", r = "id=" + this.id + "&width=" + n + "&height=" + t, u;
        return navigator.userAgent.match(/MSIE/) ? (u = location.href.match(/^https/i) ? "https://" : "http://", i += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + u + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + n + '" height="' + t + '" id="' + this.movieId + '" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="' + ZeroClipboard.moviePath + '" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="' + r + '"/><param name="wmode" value="transparent"/></object>') : i += '<embed id="' + this.movieId + '" src="' + ZeroClipboard.moviePath + '" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="' + n + '" height="' + t + '" name="' + this.movieId + '" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="' + r + '" wmode="transparent" />', i
    },hide: function() {
        this.div && (this.div.style.left = "-2000px")
    },show: function() {
        this.reposition()
    },destroy: function() {
        if (this.domElement && this.div) {
            this.hide(), this.div.innerHTML = "";
            var n = document.getElementsByTagName("body")[0];
            try {
                n.removeChild(this.div)
            } catch (t) {
            }
            this.domElement = null, this.div = null
        }
    },reposition: function(n) {
        if (n && (this.domElement = ZeroClipboard.$(n), this.domElement || this.hide()), this.domElement && this.div) {
            var t = ZeroClipboard.getDOMObjectPosition(this.domElement), i = this.div.style;
            i.left = "" + t.left + "px", i.top = "" + t.top + "px"
        }
    },setText: function(n) {
        this.clipText = n, this.ready && this.movie.setText(n)
    },addEventListener: function(n, t) {
        n = n.toString().toLowerCase().replace(/^on/, ""), this.handlers[n] || (this.handlers[n] = []), this.handlers[n].push(t)
    },setHandCursor: function(n) {
        this.handCursorEnabled = n, this.ready && this.movie.setHandCursor(n)
    },setCSSEffects: function(n) {
        this.cssEffects = !!n
    },receiveEvent: function(n, t) {
        var r, u, f, i;
        n = n.toString().toLowerCase().replace(/^on/, "");
        switch (n) {
            case "load":
                if (this.movie = document.getElementById(this.movieId), !this.movie) {
                    r = this, setTimeout(function() {
                        r.receiveEvent("load", null)
                    }, 1);
                    return
                }
                if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) {
                    r = this, setTimeout(function() {
                        r.receiveEvent("load", null)
                    }, 100), this.ready = !0;
                    return
                }
                this.ready = !0, this.movie.setText(this.clipText), this.movie.setHandCursor(this.handCursorEnabled);
                break;
            case "mouseover":
                this.domElement && this.cssEffects && (this.domElement.addClass("hover"), this.recoverActive && this.domElement.addClass("active"));
                break;
            case "mouseout":
                this.domElement && this.cssEffects && (this.recoverActive = !1, this.domElement.hasClass("active") && (this.domElement.removeClass("active"), this.recoverActive = !0), this.domElement.removeClass("hover"));
                break;
            case "mousedown":
                this.domElement && this.cssEffects && this.domElement.addClass("active");
                break;
            case "mouseup":
                this.domElement && this.cssEffects && (this.domElement.removeClass("active"), this.recoverActive = !1)
        }
        if (this.handlers[n])
            for (u = 0, f = this.handlers[n].length; u < f; u++)
                i = this.handlers[n][u], typeof i == "function" ? i(this, t) : typeof i == "object" && i.length == 2 ? i[0][i[1]](this, t) : typeof i == "string" && window[i](this, t)
    }}, typeof Object.create != "function" && (Object.create = function(n) {
    function t() {
    }
    return t.prototype = n, new t
}), function(n) {
    var i = {init: function(t) {
            return this.options = n.extend({}, n.noty.defaults, t), this.options.layout = this.options.custom ? n.noty.layouts.inline : n.noty.layouts[this.options.layout], this.options.theme = n.noty.themes[this.options.theme], delete t.layout, delete t.theme, this.options = n.extend({}, this.options, this.options.layout.options), this.options.id = "noty_" + +new Date * Math.floor(Math.random() * 1e6), this.options = n.extend({}, this.options, t), this._build(), this
        },_build: function() {
            var t = n('<div class="noty_bar"></div>').attr("id", this.options.id), i, r;
            t.append(this.options.template).find(".noty_text").html(this.options.text), t.find(".noty_head").html(this.options.title), this.$bar = this.options.layout.parent.object !== null ? n(this.options.layout.parent.object).css(this.options.layout.parent.css).append(t) : t, this.options.buttons && (this.options.closeWith = [], this.options.timeout = !1, i = n("<div/>").addClass("noty_buttons"), this.options.layout.parent.object !== null ? this.$bar.find(".noty_bar").append(i) : this.$bar.append(i), r = this, n.each(this.options.buttons, function(t, i) {
                var u = n("<button/>").addClass(i.addClass ? i.addClass : "gray").html(i.text).appendTo(r.$bar.find(".noty_buttons")).bind("click", function() {
                    n.isFunction(i.onClick) && i.onClick.call(u, r)
                })
            })), this.$message = this.$bar.find(".noty_message"), this.$closeButton = this.$bar.find(".noty_close"), this.$buttons = this.$bar.find(".noty_buttons"), n.noty.store[this.options.id] = this
        },show: function() {
            var t = this;
            if (n(t.options.layout.container.selector).append(t.$bar), t.options.theme.style.apply(t), n.type(t.options.layout.css) === "function" ? this.options.layout.css.apply(t.$bar) : t.$bar.css(this.options.layout.css || {}), t.$bar.addClass(t.options.layout.addClass), t.options.layout.container.style.apply(n(t.options.layout.container.selector)), t.options.theme.callback.onShow.apply(this), n.inArray("click", t.options.closeWith) > -1)
                t.$bar.css("cursor", "pointer").one("click", function() {
                    t.options.callback.onCloseClick && t.options.callback.onCloseClick.apply(t), t.close()
                });
            if (n.inArray("hover", t.options.closeWith) > -1)
                t.$bar.one("mouseenter", function() {
                    t.close()
                });
            if (n.inArray("button", t.options.closeWith) > -1)
                t.$closeButton.one("click", function() {
                    t.close()
                });
            return n.inArray("button", t.options.closeWith) == -1 && t.$closeButton.remove(), t.options.callback.onShow && t.options.callback.onShow.apply(t), t.$bar.animate(t.options.animation.open, t.options.animation.speed, t.options.animation.easing, function() {
                t.options.callback.afterShow && t.options.callback.afterShow.apply(t), t.shown = !0
            }), t.options.timeout && t.$bar.delay(t.options.timeout).promise().done(function() {
                t.close()
            }), this
        },close: function() {
            var t, i;
            if (!this.closed && (!this.$bar || !this.$bar.hasClass("i-am-closing-now"))) {
                if (t = this, !this.shown) {
                    i = [], n.each(n.noty.queue, function(n, r) {
                        r.options.id != t.options.id && i.push(r)
                    }), n.noty.queue = i;
                    return
                }
                t.$bar.addClass("i-am-closing-now"), t.options.callback.onClose && t.options.callback.onClose.apply(t), t.$bar.clearQueue().stop().animate(t.options.animation.close, t.options.animation.speed, t.options.animation.easing, function() {
                    t.options.callback.afterClose && t.options.callback.afterClose.apply(t)
                }).promise().done(function() {
                    t.options.modal && (n.notyRenderer.setModalCount(-1), n.notyRenderer.getModalCount() == 0 && n(".noty_modal").fadeOut("fast", function() {
                        n(this).remove()
                    })), n.notyRenderer.setLayoutCountFor(t, -1), n.notyRenderer.getLayoutCountFor(t) == 0 && n(t.options.layout.container.selector).remove(), typeof t.$bar != "undefined" && t.$bar !== null && (t.$bar.remove(), t.$bar = null, t.closed = !0), delete n.noty.store[t.options.id], t.options.theme.callback.onClose.apply(t), t.options.dismissQueue || (n.noty.ontap = !0, n.notyRenderer.render())
                })
            }
        },setText: function(n) {
            return this.closed || (this.options.text = n, this.$bar.find(".noty_text").html(n)), this
        },setType: function(n) {
            return this.closed || (this.options.type = n, this.options.theme.style.apply(this), this.options.theme.callback.onShow.apply(this)), this
        },setTimeout: function(n) {
            if (!this.closed) {
                var t = this;
                this.options.timeout = n, t.$bar.delay(t.options.timeout).promise().done(function() {
                    t.close()
                })
            }
            return this
        },closed: !1,shown: !1}, t;
    n.notyRenderer = {}, n.notyRenderer.init = function(t) {
        var r = Object.create(i).init(t);
        return r.options.force ? n.noty.queue.unshift(r) : n.noty.queue.push(r), n.notyRenderer.render(), n.noty.returns == "object" ? r : r.options.id
    }, n.notyRenderer.render = function() {
        var t = n.noty.queue[0];
        n.type(t) === "object" ? t.options.dismissQueue ? n.notyRenderer.show(n.noty.queue.shift()) : n.noty.ontap && (n.notyRenderer.show(n.noty.queue.shift()), n.noty.ontap = !1) : n.noty.ontap = !0
    }, n.notyRenderer.show = function(t) {
        t.options.modal && (n.notyRenderer.createModalFor(t), n.notyRenderer.setModalCount(1)), n(t.options.layout.container.selector).length == 0 ? t.options.custom ? t.options.custom.append(n(t.options.layout.container.object).addClass("i-am-new")) : n("body").append(n(t.options.layout.container.object).addClass("i-am-new")) : n(t.options.layout.container.selector).removeClass("i-am-new"), n.notyRenderer.setLayoutCountFor(t, 1), t.show()
    }, n.notyRenderer.createModalFor = function(t) {
        n(".noty_modal").length == 0 && n("<div/>").addClass("noty_modal").data("noty_modal_count", 0).css(t.options.theme.modal.css).prependTo(n("body")).fadeIn("fast")
    }, n.notyRenderer.getLayoutCountFor = function(t) {
        return n(t.options.layout.container.selector).data("noty_layout_count") || 0
    }, n.notyRenderer.setLayoutCountFor = function(t, i) {
        return n(t.options.layout.container.selector).data("noty_layout_count", n.notyRenderer.getLayoutCountFor(t) + i)
    }, n.notyRenderer.getModalCount = function() {
        return n(".noty_modal").data("noty_modal_count") || 0
    }, n.notyRenderer.setModalCount = function(t) {
        return n(".noty_modal").data("noty_modal_count", n.notyRenderer.getModalCount() + t)
    }, n.fn.noty = function(t) {
        return t.custom = n(this), n.notyRenderer.init(t)
    }, n.noty = {}, n.noty.queue = [], n.noty.ontap = !0, n.noty.layouts = {}, n.noty.themes = {}, n.noty.returns = "object", n.noty.store = {}, n.noty.get = function(t) {
        return n.noty.store.hasOwnProperty(t) ? n.noty.store[t] : !1
    }, n.noty.close = function(t) {
        return n.noty.get(t) ? n.noty.get(t).close() : !1
    }, n.noty.setText = function(t, i) {
        return n.noty.get(t) ? n.noty.get(t).setText(i) : !1
    }, n.noty.setType = function(t, i) {
        return n.noty.get(t) ? n.noty.get(t).setType(i) : !1
    }, n.noty.clearQueue = function() {
        n.noty.queue = []
    }, n.noty.closeAll = function() {
        n.noty.clearQueue(), n.each(n.noty.store, function(n, t) {
            t.close()
        })
    }, t = window.alert, n.noty.consumeAlert = function(t) {
        window.alert = function(i) {
            t ? t.text = i : t = {text: i}, n.notyRenderer.init(t)
        }
    }, n.noty.stopConsumeAlert = function() {
        window.alert = t
    }, n.noty.defaults = {layout: "top",theme: "defaultTheme",type: "alert",text: "",title: "",dismissQueue: !0,template: '<div class="noty_head" style="position:relative; border-bottom:1px #aaa solid; padding:5px 10px; height:20px;color:red;font-size:20px"></div><div class="noty_message" style="height:auto!important;height:60px; min-height:60px;"><span class="noty_text"></span><div class="noty_close"></div></div>',animation: {open: {height: "toggle"},close: {height: "toggle"},easing: "swing",speed: 500},timeout: !1,force: !1,modal: !1,closeWith: ["click"],callback: {onShow: function() {
            },afterShow: function() {
            },onClose: function() {
            },afterClose: function() {
            },onCloseClick: function() {
            }},buttons: !1}, n(window).resize(function() {
        n.each(n.noty.layouts, function(t, i) {
            i.container.style.apply(n(i.container.selector))
        })
    })
}(jQuery), function(n) {
    n.noty.layouts.bottomRight = {name: "bottomRight",options: {},container: {object: '<ul id="noty_bottomRight_layout_container" />',selector: "ul#noty_bottomRight_layout_container",style: function() {
                n(this).css({bottom: 20,right: 20,position: "fixed",width: "310px",height: "auto",margin: 0,padding: 0,listStyleType: "none",zIndex: 1e7}), window.innerWidth < 600 && n(this).css({right: 5})
            }},parent: {object: "<li />",selector: "li",css: {}},css: {display: "none",width: "310px"},addClass: ""}
}(jQuery), function(n) {
    n.noty.layouts.center = {name: "center",options: {},container: {object: '<ul id="noty_center_layout_container" />',selector: "ul#noty_center_layout_container",style: function() {
                var t, i;
                n(this).css({position: "fixed",width: "310px",height: "auto",margin: 0,padding: 0,listStyleType: "none",zIndex: 1e7}), t = n(this).clone().css({visibility: "hidden",display: "block",position: "absolute",top: 0,left: 0}).attr("id", "dupe"), n("body").append(t), t.find(".i-am-closing-now").remove(), t.find("li").css("display", "block"), i = t.height(), t.remove(), n(this).hasClass("i-am-new") ? n(this).css({left: (n(window).width() - n(this).outerWidth(!1)) / 2 + "px",top: (n(window).height() - i) / 2 + "px"}) : n(this).animate({left: (n(window).width() - n(this).outerWidth(!1)) / 2 + "px",top: (n(window).height() - i) / 2 + "px"}, 500)
            }},parent: {object: "<li />",selector: "li",css: {}},css: {display: "none",width: "310px"},addClass: ""}
}(jQuery), function(n) {
    n.noty.themes.defaultTheme = {name: "defaultTheme",helpers: {borderFix: function() {
                if (this.options.dismissQueue) {
                    var t = this.options.layout.container.selector + " " + this.options.layout.parent.selector;
                    switch (this.options.layout.name) {
                        case "top":
                            n(t).css({borderRadius: "0px 0px 0px 0px"}), n(t).last().css({borderRadius: "0px 0px 5px 5px"});
                            break;
                        case "topCenter":
                        case "topLeft":
                        case "topRight":
                        case "bottomCenter":
                        case "bottomLeft":
                        case "bottomRight":
                        case "center":
                        case "centerLeft":
                        case "centerRight":
                        case "inline":
                            n(t).css({borderRadius: "0px 0px 0px 0px"}), n(t).first().css({"border-top-left-radius": "5px","border-top-right-radius": "5px"}), n(t).last().css({"border-bottom-left-radius": "5px","border-bottom-right-radius": "5px"});
                            break;
                        case "bottom":
                            n(t).css({borderRadius: "0px 0px 0px 0px"}), n(t).first().css({borderRadius: "5px 5px 0px 0px"})
                    }
                }
            }},modal: {css: {position: "fixed",width: "100%",height: "100%",backgroundColor: "#000",zIndex: 1e4,opacity: .6,display: "none",left: 0,top: 0}},style: function() {
            this.$bar.css({overflow: "hidden",background: "url('') repeat-x scroll left top #fff"}), this.$message.css({fontSize: "13px",lineHeight: "16px",textAlign: "center",padding: "8px 10px 9px",width: "auto",position: "relative"}), this.$closeButton.css({position: "absolute",top: 4,right: 4,width: 10,height: 10,background: "url()",display: "none",cursor: "pointer"}), this.$buttons.css({padding: 5,textAlign: "right",borderTop: "1px solid #ccc",backgroundColor: "#fff"}), this.$buttons.find("button").css({marginLeft: 5}), this.$buttons.find("button:first").css({marginLeft: 0}), this.$bar.bind({mouseenter: function() {
                    n(this).find(".noty_close").stop().fadeTo("normal", 1)
                },mouseleave: function() {
                    n(this).find(".noty_close").stop().fadeTo("normal", 0)
                }});
            switch (this.options.layout.name) {
                case "top":
                    this.$bar.css({borderRadius: "0px 0px 5px 5px",borderBottom: "2px solid #eee",borderLeft: "2px solid #eee",borderRight: "2px solid #eee",boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"});
                    break;
                case "topCenter":
                case "center":
                case "bottomCenter":
                case "inline":
                    this.$bar.css({borderRadius: "5px",border: "1px solid #eee",boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"}), this.$message.css({fontSize: "13px",textAlign: "center"});
                    break;
                case "topLeft":
                case "topRight":
                case "bottomLeft":
                case "bottomRight":
                case "centerLeft":
                case "centerRight":
                    this.$bar.css({borderRadius: "5px",border: "1px solid #eee",boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"}), this.$message.css({fontSize: "13px",textAlign: "left"});
                    break;
                case "bottom":
                    this.$bar.css({borderRadius: "5px 5px 0px 0px",borderTop: "2px solid #eee",borderLeft: "2px solid #eee",borderRight: "2px solid #eee",boxShadow: "0 -2px 4px rgba(0, 0, 0, 0.1)"});
                    break;
                default:
                    this.$bar.css({border: "2px solid #eee",boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"})
            }
            switch (this.options.type) {
                case "alert":
                case "notification":
                    this.$bar.css({backgroundColor: "#FFF",borderColor: "#CCC",color: "#444"});
                    break;
                case "warning":
                    this.$bar.css({backgroundColor: "#FFEAA8",borderColor: "#FFC237",color: "#826200"}), this.$buttons.css({borderTop: "1px solid #FFC237"});
                    break;
                case "error":
                    this.$bar.css({backgroundColor: "red",borderColor: "darkred",color: "#FFF"}), this.$message.css({fontWeight: "bold"}), this.$buttons.css({borderTop: "1px solid darkred"});
                    break;
                case "information":
                    this.$bar.css({backgroundColor: "#57B7E2",borderColor: "#0B90C4",color: "#FFF"}), this.$buttons.css({borderTop: "1px solid #0B90C4"});
                    break;
                case "success":
                    this.$bar.css({backgroundColor: "lightgreen",borderColor: "#50C24E",color: "darkgreen"}), this.$buttons.css({borderTop: "1px solid #50C24E"});
                    break;
                default:
                    this.$bar.css({backgroundColor: "#FFF",borderColor: "#CCC",color: "#444"})
            }
        },callback: {onShow: function() {
                n.noty.themes.defaultTheme.helpers.borderFix.apply(this)
            },onClose: function() {
                n.noty.themes.defaultTheme.helpers.borderFix.apply(this)
            }}}
}(jQuery)
